I have this code:
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
if h~=nil then
h.Health = h.Health -25
script.Parent.Impact:Play()
end
end
script.Parent.Touched:connect(onTouched)
how would i make it so that when it touches the player, it has a delay between attacks? I tried putting a wait(5) before the first end, but that didn't work.

2 comments
Sorry forgot one important thing, where it says 'if h then', replace with 'if h and debounce == false' then. Apologises.
i would recommend using if not debounce then , since its more clean