So I was thinking to have a wall closing in so that my round does not go on forever. When the player is in that wall, they will take damage. How do I do that? I've tried something but the player remains unharmed while inside the zone, only taking damage upon entry.
COMMUNITY QUESTION
How do I create a brick where if the player is in, they will slowly take damage?
1 answer
Hope this helps
function onTouched(hit)
if hit.Parent:findFirstChild("Humanoid") then
while true do
hit.Parent.Humanoid:TakeDamage(1)
wait()
end
end
end
script.Parent.Touched:connect(onTouched)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
show your attempt, your script that we can fix please.