Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can you tween a GUI? (or move it if im not using the right word)

I want to tween a GUI I'm using in my game, but I'm not sure if the following works, nor how to use it:

game.Players.RandomPlayer.PlayerGui.RandomGui.Label:TweenPosition(1,1,1)

I've seen people do things like that (cant remember the exact thing), so if I'm doing this wrong, someone please correct me?

1 answer

✓ Accepted answer

To Tween position or size, You must do this command

YourGUIObjectName:TweenPosition(UDim2.new(number, number, number, number), "EasingDirection", "EasingStyle", "Time")

UDim2.new() is where you want the GUI Object to slide to.

EasingDirection is either Going In ("In") or going out ("Out")

EasingStyle is the way it slides. Here is a link to a preview of all of them. http://wiki.roblox.com/index.php?title=API:Enum/EasingStyle

Time is the amount of time it takes.

3 comments

0

Thanks for the details and links! Gave you 2+ Reputation :p

0

Thanks!

0

Just a reminder, the only required argument is the first one, which defines the position.

This discussion is preserved as it was. New answers, comments, and votes are closed.