I made this script and I would like to know how I can create a damage script that doesn't do mega damage such as this. It consistently ticks over and over in an instance and I can't know how to fix it. I would be happy for any help possible.
-- Damage script
local rarm = script.Parent:FindFirstChild("Right Arm")
local larm = script.Parent:FindFirstChild("Left Arm")
function dmg(hit)
if hit.Parent ~= nil then
local hum = hit.Parent:findFirstChild("Humanoid")
if hum ~= nil then
hum.Health = hum.Health -2
end
end
end
rarm.Touched:connect(dmg)
larm.Touched:connect(dmg)

2 comments
Me: I see this question I think debounce should do it, Clicks on question.. the moment I realized the question is already answered.
Doesn't work I'm trying to manipulate this in some sort of way that works, it might just be that my brain is backwards right now.