Animation not working

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By iiAnasEG

My animation for swing is not working(though it is taking input for mouse) at all here is the code:

if Input.is_action_just_pressed("hit"):
		print("ok")
		$AnimationPlayer.play("swing")

the animation is 0.35 seconds long

Try using the InputmouseButton instead of the inpuy

Venex2004 | 2023-04-25 06:47