This is the script:
function onClicked()
script.Parent.Parent.Position = script.Parent.Parent.Position + UDim2.new(0, 21, 0, 0)
wait(.001)
script.Parent.Parent.Position = script.Parent.Parent.Position + UDim2.new(0, 21, 0, 0)
wait(.001)
script.Parent.Parent.Position = script.Parent.Parent.Position + UDim2.new(0, 21, 0, 0)
wait(.001)
script.Parent.Parent.Position = script.Parent.Parent.Position + UDim2.new(0, 21, 0, 0)
wait(.001)
script.Parent.Parent.Position = script.Parent.Parent.Position + UDim2.new(0, 21, 0, 0)
wait(.001)
script.Parent.Parent.Position = script.Parent.Parent.Position + UDim2.new(0, 21, 0, 0)
wait(.001)
script.Parent.Parent.Position = script.Parent.Parent.Position + UDim2.new(0, 21, 0, 0)
wait(.001)
script.Parent.Parent.Position = script.Parent.Parent.Position + UDim2.new(0, 21, 0, 0)
wait(.001)
script.Parent.Parent.Position = script.Parent.Parent.Position + UDim2.new(0, 21, 0, 0)
wait(.001)
script.Parent.Parent.Position = script.Parent.Parent.Position + UDim2.new(0, 21, 0, 0)
end
script.Parent.MouseButton1Down:connect(onClicked)
The problem is, you can keep on clicking it and it will keep moving across the screen. How do I stop this from happening? The button that you click's text is ">". After you click on it once, how would you change the text to "<" and then click it once more to close it the same way?+

2 comments
Edit your post to use Lua code formatting
This is too confusing...