Alright well what you would need to do is something called "Tweening" which comes from the word Inbetweening. It makes your GUI''s move.
It's quite simple
function onClick()
script.Parent.Frame:TweenPosition(UDim2.new(0.5,0,0.5,0),"Out","Quad",5,"false",nil)
end
script.Parent.Frame.TextButton.MouseButton1Click:connect(onClick)
Instead of ( script.Parent.Frame.Position = UDim2.new(0,0,0,0))
you use (script.Parent.Frame:TweenPosition(UDim2.new(0.5,0,0.5,0),"Out","Quad",5,"false",nil))
there are six arguments in tweening.
-UDim is basically a Vector3 for the GUI's
-"out" is the direction
-"quad" is the style
-"5" is the float time or how long it takes
-"false" is overide
and -nil is callback
To better understand it you can check it out on the Roblox Wiki:
http://wiki.roblox.com/index.php/Tweening
1 comment
does notin.