Animation won't play

Godot Version

4.2

Question

In my godot game an animation on “hat_pos” called crouch will not play.

if rolling == true:
		looks.play("Dive")
		
		if recent_x > 0:
			hat_pos.play("divingRight")
		else:		
			hat_pos.play("divingLeft")
	else:
		if dir == 0:
			if is_on_floor() and Input.is_action_pressed("Down"):
				if crouching == false:
					looks.play("crouch")
					crouching = true
			else:
				hat_pos.play("default")
				crouching = false
				looks.play("idle")
		else:
			looks.play("Run")
			hat_pos.play("default")

	if crouching:
		print(hat_pos.assigned_animation)
		hat_pos.play("Crouch") # RIGHT HERE is what  I am trying to play, but it plays "default" instead
	if rolling:
		velocity.x = roll_speed * recent_x

Any ideas why

case sensitive? should be “crouch”?

No, it’s the right name.

then it’s just if branching issues, the process function might also play default while it’s also play crouch, hence it’s not playing crouch
to fix this, either fix the branching logic or use AnimationTree animation

Could I get an example of how to do this?

if you meant the AnimationTree animation, search online:

AnimationTree godot

it should show you some vids how to use it

So my animation just moved something down, so because I couldn’t get it to work I just decided to change the offset of the hat.