How do I change_scene() while the player node is in an Area for like, a range?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By DoctoriousFox

Well, I tried everything from my own thing to an actual answer: and this didnt work:
extends Area2D

export var SceneToMove = “res://Scenes/Areas/CompCatas.tscn”
var inside = false
var action = false

func _ready():
set_fixed_process(true)

func _on_Node2D_body_enter( body ):
inside = true

func _on_Node2D_body_exit( body ):
inside = false

func _fixed_process(delta):
if Input.is_action_pressed(“Interact”):
action = true
if (action and inside) == true:
action = false
get_tree().change_scene(“res://Scenes/Areas/CompCatas.tscn”)
what do I do!?
;-;