ScreenGUI Moves after a TextButton is pressed

How would I make the properties of a ScreenGUI animate to “slide left” when a TextButton is pressed.
-Would I be using UDim2? If so how do I make all of the properties of the ScreenGUI slide left and into another ScreenGUI?
-Is there another alternative ways to get what I want achieved?

1 Like

You cannot move a ScreenGui.
Have a look at GuiObjects’ TweenPosition function, which you can use to transform single GuiObjects:

4 Likes

Use TweenService to achieve this functionality WITH OBJECTS IN A SCREENGUI.

A ScreenGui itself cannot be moved but as @Flubberlutsch said, you can move GuiObjects within it.

Learn more about TweenService here:
TweenService - developer.roblox.com

2 Likes

If I was you, I’d be using UDim2, which is the best and the most easy way for GUI Tweening.

Also as said by others, you cannot move a ScreenGUI as a whole.

If you want to move the whole thing I think you can on e try to put them all in one Single Frame and if that doesn’t work out, you will have to put the Tween script into the separate buttons/GUI you want to tween.

Something like this could be used by you if you out a tween script in a regular button…

script.Parent.MouseButton1Click:connect(function()
wait (.1)
script.Parent.TweenSize(UDim2.new(THE SIZE WOULD BE HERE), “Out”, “Bounce”, 0.1)

end)

I have typed this on Phone, apologies if it isn’t easy to read.

3 Likes