TweenPosition (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>61352151511 No edit summary |
>Legend26 The last two args ARE important. Will write about them later. |
||
Line 24: | Line 24: | ||
GUI:TweenPosition(UDim2.new(1, 0, 1, 0), "Out", "Quad", 3) | GUI:TweenPosition(UDim2.new(1, 0, 1, 0), "Out", "Quad", 3) | ||
</pre> | </pre> | ||
[[Category:Methods]] | [[Category:Methods]] |
Revision as of 06:15, 13 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)