Originally posted by OfficialCoolJay
Happens to me too when ever i edit a gamemode like that, its most likely caused by having so many threads being called at a time by every player that it freezes try changing any level threads that are unesscery to be a level thread, and convert into self threads. Also any text that is added should have a Destroy(); for it rather then just disapearing. If theres any script that has it so a model is suppose to delete but uses Hide(); instead you can change that to Delete(); depending on how its used. Also add in self endon("death"); self endon("disconnect"); and level endon("game_ended"); keep in mind that level endon("game_ended"); is something that is defined only in zombieland with a level notify("game_ended"); in monitorGame() thread. Determine what kind of thread it is before adding these. if its a level thread don't add any self endon if its a self thread you will want to do this. I don't know if this helps.
That was an old post but still, thanks. It will come in handy. Something that was "new" to me was that level threads should be used extremely sparingly and cause more load than self threads, don't they?
level endon("game_ended"); honestly is quite pointless since it first of all doesn't always trigger when the game ends or you quit in some way. If you do end the game, scripts automatically stop running too. If you made it to ending the game freezing shouldn't be a big issue anymore, lol.
self endon("disconnect"); is different since it stops scripts for clients when they quit so it liberates the server from that load. Something important to mention also is
wait() statements. Do not run long loops without slowdowns. Not sure which waiting time is optimal but the longer the better lol. Using
waittill's and
endon notify constructs is much better than
You must login or register to view this content. too and could fix a function from being unstable to super stable.