Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer

Hellooo :D

script :

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

script.Parent.Touched:Connect(oof)

2 comments

0

I already found answer but thankyou for responding :D

0

:D

This discussion is preserved as it was. New answers, comments, and votes are closed.