TweenPosition (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Anaminus fixing arguments |
>61352151511 No edit summary |
||
Line 7: | Line 7: | ||
{{clear floats}} | {{clear floats}} | ||
The endPosition, is where the GUI moves to. For example if the GUI is at UDim2.new(0, 0, 0, 0) and you want it to move to UDim2.new(1, 0, 1, 0) it would be | |||
<pre> | |||
GUI:TweenPosition(UDim2.new(1, 0, 1, 0)) | |||
</pre> | |||
The easingDirection, can be either. In, Out, or InOut. Most commonly it is Out. | |||
<pre> | |||
GUI:TweenPosition(UDim2.new(1, 0, 1, 0), "Out") | |||
</pre> | |||
The easingStyle could be 8 different items. | |||
<pre> | |||
GUI:TweenPosition(UDim2.new(1, 0, 1, 0), "Out", "Quad") | |||
</pre> | |||
The float is how long it will take it to move. 1 is the default. Let's make it take 3 seconds. | |||
<pre> | |||
GUI:TweenPosition(UDim2.new(1, 0, 1, 0), "Out", "Quad", 3) | |||
</pre> | |||
And the other 2 arguments are not really important. | |||
[[Category:Methods]] | [[Category:Methods]] |
Revision as of 15:08, 8 August 2011
TweenPosition( UDim2 endPosition, Enum easingDirection = Out, Enum easingStyle = Quad, float time = 1, bool override = false, function callback = nil ) | |
Returns | nil |
Description: | Smoothly moves a GUI to a new UDim2 position. |
Member of: | GuiObject |
The endPosition, is where the GUI moves to. For example if the GUI is at UDim2.new(0, 0, 0, 0) and you want it to move to UDim2.new(1, 0, 1, 0) it would be
GUI:TweenPosition(UDim2.new(1, 0, 1, 0))
The easingDirection, can be either. In, Out, or InOut. Most commonly it is Out.
GUI:TweenPosition(UDim2.new(1, 0, 1, 0), "Out")
The easingStyle could be 8 different items.
GUI:TweenPosition(UDim2.new(1, 0, 1, 0), "Out", "Quad")
The float is how long it will take it to move. 1 is the default. Let's make it take 3 seconds.
GUI:TweenPosition(UDim2.new(1, 0, 1, 0), "Out", "Quad", 3)
And the other 2 arguments are not really important.