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

How Can I Make A Brick That Kill A Player When Touch?

2 answers

✓ Accepted answer

This is a simple version. Please try and attempt writing the code next time!

script.Parent.Touched:connect(function(hit)
	if hit.Parent.Humanoid then
		hit.Parent.Humanoid.Health = 0
	end
end)

1 comment

0

Thanks! :)

You are asking us to implement something for you. I cannot give you the whole solution, but I can give pointers to what you should do.

There is an event of all Part objects called Tocuhed. Connect to it to detect when something is touched.

Humanoid objects have the Health property and the Damage function. Use those to kill someone.

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