Hello, I'm trying to figure out what my problem is... It's giving me the error:
"Invalid type in function 'change_scene_to' in base 'SceneTree'. Cannot convert argument 1 from String to Object."
This is my code on the "portal"
extends Area2D
export (String, FILE, "*.tscn,*.scn") var next_scene
func _input(event):
if event.is_action_pressed("interact"):
if get_overlapping_bodies().size() > 0:
next_level()
func next_level():
get_tree().change_scene_to(next_scene)
When I use "export (PackedScene) var next_scene" it works correctly, but then of course I can't go backwards it just loads a blank screen.