So, I'm new on Godot and I try to make button can play the animation to move some UI, here my code.
extends Button
func _on_ExtraButton_pressed():
get_node("AnimationPlayer").play("HideExit")
But I always get error messenger like this
E 0:00:01.693 get_node: Node not found: AnimationPlayer.
<C++ Error> Condition "!node" is true. Returned: __null
<C++ Source> scene/main/node.cpp:1381 @ get_node()
<Stack Trace> ExtraButton.gd:4 @ _on_ExtraButton_pressed()
It weird, because AnimationPlayer already on scene