How would one create a script that damages the player when they touch a certain brick?
COMMUNITY QUESTION
Damage over time on touch?
2 answers
function onTouched(hit)
local human = hit.Parent:findFirstChild("Humanoid")
if (human ~= nil) then
human.Health = human.Health - 100 --This is how much is taken away
wait(2)
end
end
script.Parent.Touched:connect(onTouched)
If you get lazy, you can always find a Venomshank model, edit the "hurting over time" script, and put it into a block. (For a block that hurts long after touching)
This discussion is preserved as it was. New answers, comments, and votes are closed.
