basically if the player goes into the abilities area of damage they also take damage how am i able to prevent the player from damaging themselves without become invincible?
this is the script that i use to create the damage:
wait(1)
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil then
h.Health = h.Health -2 --Change that number to the ammount of Health you want to decrease
end
end
script.Parent.Touched:connect(onTouched)

1 comment
try adding something like if h ~= game.Players.LocalPlayer then