I need some help with my character

i dont know my gd version because im still new to gd but im in godot-4,

i am trying to make a animated character but having my animations not really working
here is my code also btw im max level noob if i made a dumb mistake

	func right_walk(_event):
if Input.is_action_just_pressed("right"):
	$"player animate".play("WALK")
	$".".flip_h = true

and btw here is the full script if you want it

extends CharacterBody2D

const SPEED = 500.0
const JUMP_VELOCITY = -800.0

func _physics_process(delta: float) → void:
# Add the gravity.
if not is_on_floor():
velocity += get_gravity() * delta

# Handle jump.
if Input.is_action_just_pressed("jump") and is_on_floor():
	velocity.y = JUMP_VELOCITY


# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
var direction := Input.get_axis("left", "right")
if direction:
	velocity.x = direction * SPEED
else:
	velocity.x = move_toward(velocity.x, 0, SPEED)

move_and_slide()

func left_walk(_event):
if Input.is_action_just_pressed(“left”):
$“player animate”.play(“WALK”)
$“.”.flip_h = false

func right_walk(_event):
if Input.is_action_just_pressed(“right”):
$“player animate”.play(“WALK”)
$“.”.flip_h = true

Make sure to place your codes in proper format, like this:

``` I used this symbol for code format, then you can paste the codes ```

And it would good if you explain the problem with your codes.

the problem is for some reason it wont play my animation but if i remove the flip_h its plays but i want to flip my animation so my player can face the right direction