CreateSlider (Function): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Tenal
No edit summary
>JulienDethurens
No edit summary
Line 20: Line 20:
exampleSliderValue.Value = 5
exampleSliderValue.Value = 5
</code></td><td>[[Image:CreateSlider.jpg|thumb|250px|CreateSlider Example]]</td></tr></table>
</code></td><td>[[Image:CreateSlider.jpg|thumb|250px|CreateSlider Example]]</td></tr></table>
==See Also==
*[[RbxGui]]
[[Category:Functions]]
[[Category:Functions]]

Revision as of 06:26, 7 February 2012

CreateSlider( number steps, number width, UDim2 position )
Returns Frame sliderGui, IntValue sliderPosition
Description: Returns 2 objects, (sliderGui, sliderPosition). sliderGui is a Frame that contains the entire slider gui. sliderPosition is an IntValue whose current value specifies the specific step the slider is currently on (This value can be modified by a script, and the slider with adjust position). The steps argument specifies how many different positions the slider can hold along the bar. width specifies in pixels how wide the bar should be (modifiable afterwards if desired). position argument should be a UDim2 for slider gui positioning.


local RbxGui = assert(LoadLibrary('RbxGui'))

local screenGui = Instance.new('ScreenGui') screenGui.Parent = game.Players.LocalPlayer.PlayerGui

local exampleSliderGui, exampleSliderValue = RbxGui.CreateSlider(10,200,UDim2.new(0.5, 270, 0.5, 232)) exampleSliderGui.Parent = screenGui

exampleSliderValue.Value = 5

CreateSlider Example

See Also