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

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

Asked by 4 years ago

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.

0
You need to explain your problem more in detail. It is hard to tell what you are asking. RBLXNogin 187 — 4y

1 answer

Log in to vote
0
Answered by
Benbebop 1049 Moderation Voter
4 years ago

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.

Ad

Answer this question