I wrote a script to slowly damage a player when they stand on a brick. It does not work, and I get no errors. What's the problem?
part = script.Parent
function onTouch(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum then
hum:WaitForChild("Health")
while hum.Health ~= 0 do
hum:TakeDamage(1)
end
end
end
part.Touched:connect(onTouch)

1 comment
Yep, thanks! Dunno what I was thinking. +1