Answered by
6 years ago Edited 6 years ago
Hello Hydroxygen4Humans,
So your script doesn't work for osme reasons. game.Players
is a service. .Health
is a property of Humanoid. Basicly you are trying to set the service's health to 0 which is wrong.
1 | for i, v in pairs (game:GetService( "Players" ):GetPlayers()) do |
2 | v.Character:FindFirstChild( "Humanoid" ).Health = 0 |
^ that right there is a generic loop, we are going through each index of the table game:GetService("Player"):GetPlayers()
which returns the table of the players. Then we are changing each index's humanoid health to 0, the index is the player (v).