Scene Change Issue

One of my scenes(B) works perfectly well if launched by itself, but everytime I launch a scene previous to it, and I progress to that scene(B), nothing works anymore. any way to fix this?

Thank you!

Hi @Jasmin_Gonzales!

What do you mean with ‘nothing works anymore’? Do you get any errors?

How do you change your scene?

collisions and buttons dont work. this is how I change my scene:

if (result.other.name == 'portal') {
        if (counter >= 8) {
            
            var SceneToOpen = this.app.getSceneUrl('Untitled 8');
            this.app.scenes.loadScene(SceneToOpen);

            var CurrentScene = this.app.root.findByName('Root');
            CurrentScene.destroy();
        }
    }
};

Can you try to replace your code with the code below?

if (result.other.name == 'portal') {
    if (counter >= 8) {
        this.app.scenes.changeScene('Untitled 8');
    }
}