So basically we all know the while true do and while wait() do loops. So those loops are technically unbreakable but can be breaked by using 'break' however, what I want is a loop that nevers breaks even if the character was reloaded. (im talking about a localscript for the player)
so it would be like:
(true) while wait() do print'Hello' break end
but what I want:
while wait() do (characterloaded) loop = true end
the loop never breaks except when the 'break' is used. Is this possible?
(EDITED) Had to Edit because of some misread context in your details.
If you want to make an unbreakable loop, just do
while wait() do -- .... end
But if you would want your script to be broken use the if statement else then
. By the way, your script will not continue to run if your while loop is never meant to be break
. So be careful with scripting while loops.
while true do -- code here end
you can't break if it's inside a function, done.