I want to create an animation that puts the character in a certain position and then starts the loop, like from frame 0 to 4, then the loop goes from 5 until 9, without restarting from 0. I already tried creating two animations and creating another function with yield like the one below:
func _play_animation():
$Animation_swalking.play("start_walking")
yield ($Animation_swalking, "animation_finished")
$Animation_walking.play("walking")
func _physics_process(delta):
if Input.is_action_pressed("right"):
velocity.x = SPEED
$Sprite.flip_h = false
$Sprite.play("walking")