Well the title basically explains what I need to know...
COMMUNITY QUESTION
How do I make it the players damaged when it touches a certain block ?
3 answers
Put in a regular script inside the brick.
script.Parent.OnTouched:connect(function(p)
if p.Parent.Humanoid~=nil then
p.Parent.Humanoid.Health=p.Parent.Humanoid.Health-20 -- Can be any damage you want
end
end)
try this
script.Parent.Touched:connect(function(hit)
human = hit.Parent:FindFirstChild("Humanoid")
if human then
human:TakeDamage(5)
end
end)
Thanks both of you guys for your scripts this has also teached me some scripting
This discussion is preserved as it was. New answers, comments, and votes are closed.
