Hi, I am trying to add an animation to my gun which I use the function called is_playing(). I have some problems with it, also I get an error that says the Node cannot be founded. I am sharing the exact code and images below for your consider, any feedback will be greately appriciated.
`@onready var gun_anim = $Head/Camera/Rifle/AnimationPlayer
func physics_process(delta):
if Input.is_action_pressed("shoot"):
if !gun_anim.is_playing():
gun_anim.play("Shoot")
`
THE ERROR I GET:
E 0:00:00:0966 Player.gd:17 @ _ready(): Node not found: "Head/Camera/Rifle/AnimationPlayer" (relative to "/root/Main/Player").
<C++ Error> Method/function failed. Returning: nullptr
<C++ Source> scene/main/node.cpp:1651 @ get_node()
<Stack Trace> Player.gd:17 @ _ready()