Need help with Combat System Animation Bug

Hey guys!

So, I’ve been working on my first Hand to Hand Combat system for a few days now, and I got a pretty good system down. I have a small issue though.

Everytime I activate the combat (uses UIS to activate), and I hit, the animation plays really fast and is seemingly buggy. Everytime I block however, and then hit, it works perfect. This is the main hit code, I don’t want to send all the code as its like 250 lines for the server side and too much to send alone.

HitEvent.OnServerEvent:Connect(function(plr)
local char = plr.Character
local hum = char.Humanoid
	
if blocked.Value == true then warn("Blocking Currently") return end

	local partsNearby = createRay(char)
	if partsNearby == nil and damageDebounce == false then
		print("nun")
		damageDebounce = true
		playCombo(hum)
		wait(DebounceTime.Value)
		damageDebounce = false
		return
	end

if partsNearby == nil or damageDebounce == true then return end

	if partsNearby.Parent:FindFirstChild("Humanoid") then
		print('sum')
		damageDebounce = true
		playCombo(hum)

		local EnemyChar = partsNearby.Parent
		local EnemyHum = EnemyChar:FindFirstChild("Humanoid")
		local damage = findDamage(EnemyChar,char)
		
		EnemyHum:TakeDamage(damage,EnemyChar)
		
		if damage <= 0 then
			playAnim(ParriedAnim,hum)
			parried.Value = true
			local newParry = createEffect(Vector3.new(char.Head.Position.X,char.Head.Position.Y*1.5,char.Head.Position.Z),EnemyChar,ParryEffect)
			hum.WalkSpeed = 0
			hum.JumpHeight = 0
			playSound(EnemyChar.HumanoidRootPart.Position,EnemyChar,ParrySound)
			wait(ParryTime.Value)
			stopAnim(hum)
			parried.Value = false
			tweenEffect(newParry)
			hum.WalkSpeed = game:GetService("StarterPlayer").CharacterWalkSpeed
			hum.JumpHeight = game:GetService("StarterPlayer").CharacterJumpHeight
			damageDebounce = false
		else
			local newBlood = createEffect(EnemyChar.HumanoidRootPart.Position,EnemyChar,HitEffect)
			playSound(EnemyChar.HumanoidRootPart.Position,EnemyChar,HitSound)
			wait(DebounceTime.Value)
			damageDebounce = false
			tweenEffect(newBlood)
		end
	end
end)

Please if you know whats up with animations let me know!

Turns out its not the debounce but I still need help on the actual animations. Please anyone

So basically you wanna make it so when you hit it will stop anim?

No?

The animation plays really quick, and not fully, when you hit. When you block, and then hit, it plays perfectly everytime you hit.

I quite don’t understand you, which one of animation plays fast?

If you notice in this clip, I can hit but the animation plays REALLY quick. After I blocked, it plays normally and everything works perfectly. https://gyazo.com/4ff325a371b793451b101027515d227f

My issue is I want it to always work, even before blocking. Thats whats happening.