i'm gaving an error and i tried everything and it doesn't work
here is my code:
# checks the state of the player aka skin
func skin_change():
loader()
if player_skin == 0:
$AnimationPlayer.play("duck_collision")
if !is_on_floor():
$AnimatedSprite.play("duck_jump")
else:
$AnimatedSprite.play("duck_run")
elif player_skin == 1:
$AnimationPlayer.play("goose_collision")
if !is_on_floor():
$AnimatedSprite.play("goose_jump")
else:
$AnimatedSprite.play("goose_run")