I was wondering how I could make a die on touch event script on my own instead of using the script free models...
COMMUNITY QUESTION
How can I make a die on touch event?
1 answer
function onTouched (Part)
local h = Part.parent:findFirstChild("Humanoid")
if h~=nil then
h.Health = h.Health-100
end
end
script.Parent.Touched:Connect(onTouched)
This should work.
2 comments
0
thank you.
0
No problem.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
please note that you shouldn't just ask for a script without trying to solve the questions yourself. It's the most common reason questions get closed as non constructive
questions like this are considered requests, not seeking for help. So try not to do that.