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

How to remove all players humanoid?

Asked by 4 years ago

Current Script :

game.Players:WaitForChild("Jack_Hase")
local player = game.Players:GetPlayers()
for i = 1, #player do
player[i].Character:Destroy()
end

Error : Workspace.Script:4: attempt to index field 'Character' (a nil value)

So what I want this script to do is remove all player's humanoid or make all players ragdoll forever. This could be used in an earthquake where the shake is so strong, no one can stand up, they all ragdoll.

Thanks

0
in line 1, this is used because when I join the earthquake starts, I will add shaking later if I want to Jack_Hase 85 — 4y

1 answer

Log in to vote
0
Answered by
tomekcz 174
4 years ago
game.Players:WaitForChild("Jack_Hase")
local player = game.Players:GetPlayers()
    for i = 1, #player do
    player[i].Character.Humanoid:Destroy()
    end

0
thank you Jack_Hase 85 — 4y
0
:D tomekcz 174 — 4y
Ad

Answer this question