of     1   

Valenthian
#188722532Saturday, May 07, 2016 1:37 PM GMT

If I have a for loop running can I somehow break it without the line of code that breaks it being inside the loop? What I usually do local broken = false for i = 1,60 do if broken == true then break end wait(1) end What I want to do for i = 1,60 do wait(1) end break() -- a function that just breaks the loop
JarodOfOrbiter
#188723079Saturday, May 07, 2016 1:47 PM GMT

You can't. It's kind of ugly, but stick to the first method.
chimmihc
#188723200Saturday, May 07, 2016 1:49 PM GMT

How would that work? The "break()" would not be reached until the loop completely finished.
JarodOfOrbiter
#188723249Saturday, May 07, 2016 1:50 PM GMT

Unless it's running asynchronously, which is what he is meaning.

    of     1