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

How come this script doesn't kill the player when they touch it?

Asked by 4 years ago

Here is the script: ~~~~~~~~~~~~~~~~~ game.Players.LocalPlayer.Touched:connect(function(hit) game.Players.LocalPlayer.Humanoid.Health = 0 end) ~~~~~~~~~~~~~~~~~ Please tell me if i'm wrong and tell me how to fix it, thank you

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

Hellooo :D

script :

function oof(plr)
    local humanoid = plr.Parent:WaitForChild("Humanoid")
    humanoid.Health = 0
end

script.Parent.Touched:Connect(oof)
0
I already found answer but thankyou for responding :D Nifemiplayz 32 — 4y
0
:D Thiago_GGXDYT 15 — 4y
Ad

Answer this question