How to return to last scene

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Newby

What code can i use to return to the last scene you came from

:bust_in_silhouette: Reply From: brane

One of the solutions is to have a variable in your global script where you reference the previous scene.

So, in your function, when you are changing the scene, first you memorize the current scene into the previous_scene variable and then you go to the new scene.