How to transition to any state in an animation tree without conditions in Godot 4

Godot Version

4.2.2

Question

Hello! I’m new to godot and I am trying to make a state machine for my game. I am trying to follow a tutorial for an older version and they use this method to transition to any state without any condition:

var anim = $AnimationTree.get(“parameters/playback”)
anim.travel(“idle”)

In my version I cant use anim.travel(“idle”) I get that the travel function does not exist. Also I cant use the var anim = $AnimationTree.get(“parameters/playback”).

Can you share you errors and scene tree? If $AnimationTree.get("parameters/playback") doesn’t work then you might not have an AnimationTree node, or the AnimationTree does not have a State Machine root node.