I will kill myself looking at this script: here is the proper script:
local Part = script.Parent
local Damage = 20
local Enabled = true
function onTouch(hit)
if Enabled == true then
if hit.Parent and hit ~= nil and hit.Parent:findFirstChild('Humanoid') then
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - Damage
Enabled = false
wait(1)
Enabled = true
end
end
end
Part.Touched:connect(onTouch)
r+ ROBLOX enthusiast |