i've seen a video tutorial but that tutorial has no flipping, that is when I looked to find other videos. but I can't seem to flip my player horizontally. Nothing seems to work.
NOTE: There is only 1 Player.tscn. that is attached to the Player.gd. There are 2 scripts. Actor.gd and Player.gd
This is the screenshot for the Player.tscn. The Position2D has Sprites in it that is attached to the AnimationPlayer. The animation works but I just can't seem to flip it/ -x
Any help would be greatly appreciated.

=============================================
This is the script for the Actor.gd:
extends KinematicBody2D
class_name Actor
const FLOOR_NORMAL: = Vector2.UP
export var speed: = Vector2(300.0, 1000.0)
export var gravity: = 3000.0
var _velocity: = Vector2.ZERO
=========================================================
This is the script for the Player.gd:
extends Actor
export var stomp_impulse = 700.0
func on_EnemyDetector_area_entered(area:Area2D) -> void:
velocity = calculate_stomp_velocity(_velocity, stomp_impulse)
func _on_EnemyDetector_body_entered(body:PhysicsBody2D) -> void:
queue_free()
func physics_process(delta: float) -> void:
var is_jump_interrupted: = Input.is_action_just_released("jump") and velocity.y < 0.0
var direction: = get_direction()
velocity = calculate_move_velocity(velocity, direction, speed, is_jump_interrupted)
velocity = move_and_slide(velocity, FLOOR_NORMAL)
func get_direction() -> Vector2:
return Vector2(
Input.get_action_strength("move_right") - Input.get_action_strength("move_left"),
-1.0 if Input.is_action_just_pressed("jump") and is_on_floor() else 1.0
)
func calculate_move_velocity(
linear_velocity: Vector2,
direction: Vector2,
speed: Vector2,
is_jump_interrupted: bool
) -> Vector2:
var out: = linear_velocity
out.x = speed.x direction.x
out.y += gravity get_physics_process_delta_time()
if direction.y == -1.0:
out.y = speed.y * direction.y
if is_jump_interrupted:
out.y = 0.0
return out
func calculate_stomp_velocity(linear_velocity: Vector2, impulse: float) -> Vector2:
var out: = linear_velocity
out.y = -impulse
return out
func _ready():
$AnimationPlayer.play("Walk")
set_process(true)
set_process_input(true)
var motion = Vector2()
func physics_process(delta):
if Input.is_action_just_pressed("ui_right"):
motion.x =200
$AnimationPlayer.flip_h = false
elif Input.is_action_just_pressed("ui_left"):
motion.x = -200
$AnimationPlayer.flip_h = true
else:
motion.x = 0
motion = move_and_slide(motion)
pass