here is my "Simple" punching script. When fired the player does the animation
and it makes it when the left-hand is touched and finds a humanoid it damages it
but when fired multiple times it stores hits like when I'm not punching and bumping into the dummy, it damages it even though I'm not punching!!!!!!!!!!!!!
local Remote = game.ReplicatedStorage.PunchEvent
local found = false
Remote.OnServerEvent:Connect(function(plr)
local char = plr.Character or plr.CharacterAdded:wait()
local rarm = char.LeftLowerArm
rarm.Touched:Connect(function(hit)
if hit and hit.Parent:FindFirstChild("Humanoid") then
if found == false then
found = true
hit.Parent.Humanoid:TakeDamage(12)
wait(1.5)
found = false
end
end
end)
end)

2 comments
help me
Use debounce...