Need help, weird bug

Hey! So,
I have an attack animation when pushing Z, and when releasing it, another animation plays. Oddly enough, when pushing key codes such as A + D, A + S, Q + E, it ends. Here’s the script:

UIS.InputEnded:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.V and isRunning then
	toggleRun("off")
end
if Input.KeyCode == Enum.KeyCode.Z and Z_Charging then
	local check = UIS:IsKeyDown(Enum.KeyCode.Z)
	print("end animation")
	if not check then
		ZCanCharge = false
		local FinalCharge = tick() - ZAttackCharge 
		print(FinalCharge)
		ZChargeA:Stop(0.25)
		ZAttackA:Play(0.2)
		repeat wait() until ZAttackA.Stopped
		Z_Charging = false
		wait(1)
		ZCooldown = false
	end
end
end)

Thank you! Questions? Go ahead and ask!

I would have done it a way less effective way. That script is kinda to complicated for me so R.I.P. I hope u get help soon!

1 Like