[RESOLVED] Run same code 2 different results

I’m running a simple gotoScene:

storyboard.gotoScene(“tournament_lobby”, {params = { showResults = false }})

When I run it via a menu I created inside the app it works great but when I run it via the android back button crazy things happen. The gotoscene appears to work fine but when I go back into the level a lot of things are missing and scrollviews don’t work correctly etc. However when this code gets ran using my menu button I created and I go back into the level everything works perfectly. I’m boggling my mind really any ideas?

Are you removing or purging the scene at all?

On every enterScene I have storyboard.removeAll() and I also have purgeOnSceneChange set to true.

On the inner scene I setup some functions. When I close the scene I should no longer be able to call those functions for another scene right?

Finally figured it out…I was creating a local group but I was doing it inside the createScene so it was only local to that function. I was adding things to the group in the enterScene as well. By moving the group deceleration outside of the createScene fixed my problem. So many hours spent trying to find such a simple bug :smiley:

Are you removing or purging the scene at all?

On every enterScene I have storyboard.removeAll() and I also have purgeOnSceneChange set to true.

On the inner scene I setup some functions. When I close the scene I should no longer be able to call those functions for another scene right?

Finally figured it out…I was creating a local group but I was doing it inside the createScene so it was only local to that function. I was adding things to the group in the enterScene as well. By moving the group deceleration outside of the createScene fixed my problem. So many hours spent trying to find such a simple bug :smiley: