I'm trying to make a gui that changes positions using the Tweenposition function but it only works once and won't work again until my player respawns.
Local script located in textbutton:
local inuse = false script.Parent.MouseButton1Click:connect(function() if inuse == false then inuse = true script.Parent.Parent:TweenPosition(UDim2.new(0, 350,0, 230)) wait(1.5) end end) script.Parent.MouseButton1Click:connect(function() if inuse == true then inuse = false script.Parent.Parent:TweenPosition(UDim2.new(0, 10,0, 230)) wait(1.5) end end)
Thanks!
local inuse = false script.Parent.MouseButton1Click:connect(function() if inuse == false then inuse = true script.Parent.Parent:TweenPosition(UDim2.new(0, 350,0, 230)) else inuse = false script.Parent.Parent:TweenPosition(UDim2.new(0, 10,0, 230)) end end)