Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

How to close this animated gui?...

Asked by 9 years ago

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?+

0
Edit your post to use Lua code formatting BlueTaslem 18071 — 9y
0
This is too confusing... kieranm9090 49 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

All I have to say is, see how you do that command over and over and over.. Only type it once, and before the command type: While true do

Ad

Answer this question