My animation keeps looping even if its not supposed to

Godot Version

Godot Engine v4.4.1.stable.steam.49a5bc7b6

Question

if player.is_on_floor():
		if abs(motion.x) < 1:
			animation.speed_scale = 1
			if Input.get_axis("Down", "Up") < -0.4:
				animation.play("GetDown")
				got_down = true
			else:
				animation.play("Idle")
				got_down = false


I already checked if the AnimationPlayer loop box is disabled

Try checking if it is already down before you play the animation:

	if player.is_on_floor():
		if abs(motion.x) < 1:
			animation.speed_scale = 1
			if Input.get_axis("Down", "Up") < -0.4:
				if !got_down:
					animation.play("GetDown")
					got_down = true
			else:
				animation.play("Idle")
				got_down = false
1 Like

It qorked, thank you

1 Like