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

How can I make a die on touch event?

I was wondering how I could make a die on touch event script on my own instead of using the script free models...

2 comments

0

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

0

questions like this are considered requests, not seeking for help. So try not to do that.

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.