How are you "switching" the scene ?
If you are loading it, whenever a scene is loaded, all previous scenes do not exist and the new one is loaded with its default values / settings. If you are doing this, you need to manually save the data / variable states either in memory thru global scripts or to a file.
You can also check the responses here and here for a similar question.
Also, you could (depending on your case) not change the scene but use a PopupDialog menu, usually used for pause menus.
Hope this helps :-)