I tried to make a text box that would have multiple functions. For a example you click it once it will go to the right you click it again it will go to the left with 1 button the problem is that when i try to do it i click it it goes to the left and i click it again it stays at the left here is what i tried.
script.Parent.MouseButton1Down:Connect(function()
script.Parent.Position = UDim2.new(0.727, 0, 0.401, 0)
end)
script.Parent.MouseButton1Down:Connect(function()
script.Parent.Position = UDim2.new(0.019, 0, 0.397, 0)
end)
Any help is appreciated.

1 comment
You could have a variable that holds a state and changes it based on what the last click did. For example you could say that state = "left" and if state = "left" then move it right and assign "right" to state indicating its last move.