Cant get change scene to work

Godot Version

Godot 4.1.2

Question

im very new to godot and i have no idea how can i make it so when my character enters an Area2D it will be transported to another scene but when i put “get.tree().change_scene_to_file(“res://testscenes/Levels/house.tscn”)” my code gives me an error “Cannot find property “tree” on base “Callable”.”

You have a typo, change to:

get_tree().change_scene_to_file(...)

Always make double sure you haven’t got typos in your code :slight_smile:

2 Likes

You have to write:

get_tree().change_scene_to_file()

Instead of:

get.tree().change_scene_to_file()

ohhh alright thx :smiley:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.