Animation playing for only 1 frame

Godot Version

4.5.1

Question

I have this script under the process func and when the attack button is held it calls this:

if attack:
	if !attacking:
		swd_anim_player.play("attack0")
		attacking = true
else:
	if attacking:
		swd_anim_player.play("RESET")
	attacking = false

and the animation only plays for 1 frame and a i cannot figure out why because other inputs call their animations fine using a similar setup.

Maybe your other inputs are evaluating their else, thus playing “RESET”

i appreciate another perspective, i have been banging my head against the wall for a while