0 votes

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():
    if player_skin == 0:
        if !is_on_floor():

    elif player_skin == 1:
        if !is_on_floor():
Godot version 3.5.1
in Engine by (25 points)

1 Answer

–1 vote

It's difficult to answer because you don't say which line has the error, but either $AnimatedSprite or $AnimationPlayer doesn't exist relative to the node which has this code.

by (1,053 points)

the error is at "$AnimationPlayer.play("duck_collision")"

It's $AnimationPlayer then.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.