local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local Combo = 1
local enabled = true
local CanDamage = false
mouse.KeyDown:connect(function(key)
if key == "q" then
if Combo == 1 then
if not enabled then return end
enabled = false
local a = player.Character.Humanoid:LoadAnimation(script.Punch1):Play()
wait(0.5)
Combo = 2
enabled = true
mouse.KeyDown:connect(function(key)
if key == "q" then
if Combo == 2 then
if not enabled then return end
enabled = false
local b = player.Character.Humanoid:LoadAnimation(script.Punch2):Play()
wait(0.5)
Combo = 3
enabled = true
mouse.KeyDown:connect(function(key)
if key == "q" then
if Combo == 3 then
if not enabled then return end
enabled = false
local c = player.Character.Humanoid:LoadAnimation(script.Kick):Play()
wait(0.5)
Combo = 1
enabled = true
end
game.Workspace:FindFirstChild(game.Players.LocalPlayer.Name)['LeftHand'].Touched:connect(function(part)
local human= part.Parent:findFirstChild("Humanoid")
if human then
if human.Parent.Name~= game.Players.LocalPlayer.Name and CanDamage == false then
CanDamage = true
human:TakeDamage(10)
wait(1.2)
CanDamage = false
end
end
end)
game.Workspace:FindFirstChild(game.Players.LocalPlayer.Name)['RightHand'].Touched:connect(function(part)
local human= part.Parent:findFirstChild("Humanoid")
if human then
if human.Parent.Name~= game.Players.LocalPlayer.Name and CanDamage == false then
CanDamage = true
human:TakeDamage(10)
wait(1.2)
CanDamage=false
end
end
end)
end
end)
end
end
end)
end
end
end)
Basically I tried to change the CanDamage Variable to false instead of true i switched places between them and nothing seems to work It does damage even when the animation is not playing.
Help me please.

2 comments
Why did you do so many separate events? (mouse.KeyDown)
You can use and statements like if debounce1 == false and debounce2 == false then