my script is trying to make it to where every second, you lose 5 Health, but It just automatically kills you, the second you touch the part(this is a script within a part)
local HealthLoss = 5
script.Parent.Touched:connect(function(hit)
if hit.Parent then
local hum = hit.Parent:findFirstChild("Humanoid")
if hum then
droppedhealth = HealthLoss - HealthLoss
hum.Health = droppedhealth
end
end
end)
Any and all help is welcomed, maybe a reason on why this code persay was not working?

1 comment
Thank you, this is very helpful!