So I've made a "Portal" type thing, that when the player enters it it changes scene.
Here's the code for it. I'm using GDScript
export var NextScene: PackedScene
if "Player" in body.name:
For some reason all this does is just restarts the scene, and I have changed "PackedScene" to the scene I want it to go to. Please help I have no clue why this is happening, I even tried copy and pasting somebody else's code, and they said their code worked for them.