Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I make a script that after 5 seconds have past the game will delete everyone's Humanoid?

Asked by
Wubblu 20
9 years ago

I have done this code VVV

wait(5)
FindH = game.Players:FindFirstChild(Humanoid)
FindH:Destroy()

but it does not work. I know about the PlayerJoined command but I need to be able to find all the players and edit them for a game I am making. So how would I do that?

1 answer

Log in to vote
2
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
9 years ago

You would need a loop and the GetChildren method.

wait(5)
for i,v in pairs(game.Players:GetChildren()) do
    v.Character.Humanoid:Destroy()
end
0
That script does not work? Wubblu 20 — 9y
0
I realized a flaw. Try now. Shawnyg 4330 — 9y
0
Thank you so much :D Wubblu 20 — 9y
0
No problem. Shawnyg 4330 — 9y
Ad

Answer this question