I want to write a script builder script that will kill all the players but I don't know how to do that without knowing anyones names... any help
✓ ANSWER ACCEPTED
how do I find a player in the players without knowing their name?
1 answer
✓ Accepted answer
You can iterate through the players service and for each of them, call the BreakJoints function on their character.
local players = Game.Players:GetPlayers(); -- Store a table of all the players in the players service.
for key = 1, #players do -- Set key to 1, every iteration increase it by 1 until it reaches the length of the players table
players[key].Character:BreakJoints(); -- Call BreakJoints on each player's character to kill them
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
