If, in some bizarre case, you have a looping round script and it breaks, your entire game is on freeze. Forever! In that case, could you possibly wrap said round script in a giant pcall as follows?
function mainRoundSequence()
while wait() do
-- intermission
wait(10)
-- load map
wait(5)
-- load characters
wait(30)
-- round over
wait(5)
-- articulate the round stats, start over.
end
end
while wait(1) do
success, err = pcall(function()
mainRoundSequence()
end)
if err then print(err) end
end
Again, would this script theoretically work to make your script "break-proof"? Thanks in advance.

3 comments
couldnt it still hang on the error forever just continually restarting? i guess it depends what the issue is.
yeah what DinozCreates said, most errors won't fix themselves, it is best that they "freeze" it
You shouldn't call wait in the condition because it is hacky. It only works because it abuses the fact that numbers are truthy values, and wait returns a number.