I have two scenes. Game scene where all the game data and objects sit and Main Menu scene.
This script sit on the Game scene and while playing the game when the playe