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

How to make a gui move?

When I make a change name gui for my fort I cannot figure out how to make a different gui move when you click a button on another gui.

Example: My Change Team gui is on the right side, with only that part of the gui. When I click the Change Name gui then two gui's move from off the screen, to on the screen. When I click the Change Team gui again, the new gui's move off the screen.

2 answers

You should use the TweenPosition method. This will animate a change in the position of the GUI. For example:

local Gui = script.Parent
Gui:TweenPosition(UDim2.new(0, 0, 0, 0))

would animate the parent of the script's position to the top left corner of the screen. You can specify other arguments, including the animation direction, the style of the animation, the time it takes to complete the animation, and whether it can be overridden by another animation. A guide to tweening can be found on the wiki.

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