I have a knife script that simple removes health and plays an animation when the player clicks and the knife it touching the player. For some reason, these events, even though the knife is not touching a character, will stack however many times it runs, then dealing an equivalent amount of damage. What is the issue in my script?
script.Parent.Activated:Connect(function()
if Cooldown == false then
script.Parent.Handle.Touched:Once(function(Hit)
if Hit.Parent:FindFirstChild("Humanoid") then
Cooldown = true
local Victim = Hit.Parent
Victim.Humanoid.Health -= Damage
AnimTrack:Play()
wait(1)
Cooldown = false
end
end)
end
end)
ignore the lobby music