the code is
while true do
if game.Players.NumPlayers == ("1")
then game.Players:ClearAllChildren()
end
end
After it crashes my studio ( after I put in test mode ) Any other script I put in Crashes it to (in test mode ) IT crashes it and allows no other script there, any help on the reason why it does this?
(P.S, I can re-load Roblox Studio and its the same problem with any script in test mode... )

3 comments
THANKS THIS REALLY DID HELP IT DOESNT CRASH IT :D
Glad I could help!
Actually, that's not why it crashes. All games work on an infinite loop. It crashes because you are blocking the thread scheduler, who it's waiting for the script thread to yield for it to run other threads like the studio UI. So if you don't allow it to move with other threads the program will freeze.