Only plays left idle when if idle and only plays right walking when moving.

Godot Version

extends CharacterBody2D

@export var move_speed : float = 100
@export var starting_direction : Vector2 = Vector2(0, 1)

@onready var animation_tree = $AnimationTree
@onready var state_machine = animation_tree.get("parameters/playback")

func _ready(): 

func _physics_process(_delta):
	var input_direction = Vector2(
		Input.get_action_strength("right") - Input.get_action_strength("left"),
		Input.get_action_strength("down") - Input.get_action_strength("up")
	velocity = input_direction * move_speed 
func update_animation_parameters (move_input: Vector2) :
	if(move_input == Vector2.ZERO):
		animation_tree.set("parameters/Idle/blend_position", move_input)
func pick_new_state():
	if(velocity == Vector2.ZERO):"Idle")"Walk")


I am following a tutorial and I get over halfway through when I run into this issue. I have gone back and relooked everything multiple times and I can’t figure out what I am doing. I am very new to coding and some help and advice is really needed. If I’m idle then it plays left idle animation but if I move it play the right walking animation. Idk why it doesn’t change with the directions I am moving.