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.
What you could have is a bool variable for example
local bool = false script.Parent.Parent.TextButton.MouseButton1Click:Connect(function() if bool == false then script.Parent.Parent.Frame.Position = UDim.new(0,727, 0, 0.401, 0) bool = true elseif bool == true then script.Parent.Parent.Frame.Position = UDim2.new(0.019, 0, 0.397, 0) end end)