How do you make a "kill all" function in your script?

[Pie] RepeatWeb
Joined 21/06/2019
Posts 28
06:01 AM 18/10/2020
I don't know how to make everyone in my game killed when a function is called.

Would I have to kill each player individually through a loop?


[Quit] HeavenIy
Joined 10/09/2020
Posts 1,444
06:02 AM 18/10/2020
:kill all


SmartLion
Joined 16/04/2017
Posts 1,970
07:52 PM 18/10/2020
function killAll() {
Game.players.forEach(player => {
player.kill()
});
}

1