Hi, I am trying to find a script would allow a GUI button to move when a player use an onClicked function.
What would the script be? (Just make an example script, but don't make the script too complicated!)
local tweened = false script.Parent.MouseButton1Click:connect(function() if not tweened then tweened = true script.Parent:TweenPosition(UDim2.new(0, 15, 0, 15)) --change the numbers to wherever you want the button to go, TweenPosition makes it glide smoothly elseif tweened then tweened = false script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0)) --this is the button's original position end end)