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

How to make an on command function which breaks a loop?

Been trying to make a gui for a game with a loop and the button would make a loop every 1 second but I don't know how I would break the loop with another button.

1 comment

0

You need to explain your problem more in detail. It is hard to tell what you are asking.

1 answer

✓ Accepted answer

You could use something like

while script.BoolValue.value == true do
	-- your loop --
end

and change the BoolValue to false when you want to break it.

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