I have a big problem with programming the sword. The point is, it hits a few times but the damage deal is set to 5. Look
dev.wmv (1.1 MB)
you can see that it deals damage multiple times. Here are my scripts.
This “CoolDown” is Bool value
this is animation script. ^
and this is damage script ^
can it be solved. I would be very grateful
Damage script needs a debounce check:
local debounce = false script.Parent.Touched:Connect(function(hit)) local humanoid = hit.Parent:FindFirstChildWhichIsA("Humanoid") if humanoid and not debounce then humanoid:TakeDamage(5) debounce = true wait(1) debounce = false end end)
yes it works thanks a lot!!!