I have this brick that is on fire it is supposed to burn the player and hurt the player over time
heres the script
function onTouched(part)
local h = part.Parent:FindFirstChild("Humanoid")
if h ~= nil then
h.Health = h.Health - 1
end
end
script.Parent.Touched:connect(onTouched)
But when the player isn't touching the brick it will not harm the player
to get this straight too I the player touches the brick it will harm them bt as soon as the stop touching the brick it will stop harming them
https://www.roblox.com/games/540624890/2D-Adventure-NEW-RELEASE

3 comments
You're only subtracting one health...
Error?
i want is to subtract 1 health every 1 second ik ill probably have to add a while true do statement tho