extends Sprite2D
var speed = 200
func _process(_float) -> void:
$".".rotation = get_local_mouse_position()
if Input.is_action_pressed("right"):
$".".position.x += speed * get_process_delta_time()
if Input.is_action_pressed("left"):
$".".position.x -= speed * get_process_delta_time()
if Input.is_action_pressed("up"):
$".".position.y -= speed * get_process_delta_time()
if Input.is_action_pressed("down"):
$".".position.y += speed * get_process_delta_time()
$".".rotation = get_local_mouse_position() this line gives the error