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

How do you make an object kill you when you touch it? [SOLVED]

I want there to be a piece to kill me and other players when they touch it.

1 answer

✓ Accepted answer

Put this script into whatever brick that you want it to kill you.

function onTouched(hit)

local h = hit.Parent:findFirstChild("Humanoid")

if h ~= nil then

h.Health = 0

end
end
script.Parent.Touched:connect(onTouched)

1 comment

0

Remember to hit this as the answer if it works.

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