Hello, I've made a damage script in the past, and now I'm using it again. The damage script didn't have any debounce so I decided to add that, but then the script just broke entirely.
local debounce = false
function OnTouch(damage)
if not debounce then
debounce = true
damage.Parent:FindFirstChild("Humanoid").Health = damage.Parent:FindFirstChild("Humanoid").Health -50
wait(1)
debounce = false
end
end
script.Parent.Touched:connect(OnTouch)
(Damage script might look like a free model because I wasn't the best scripter back then)
Thanks for your time!

2 comments
maybe u should make the wait period longer since its only 1 second
connect is deprecated, use Connect