Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to close this animated gui?...

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

0

Edit your post to use Lua code formatting

0

This is too confusing...

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.