I’m working on a game loop (minigame loop) and right now I wait for the first player to join and then I begin it (so I don’t start the game if I’m in run mode in studio, or if the first player is still loading)
I want to stop the game loop whenever the last player leaves, and put the game back into an inactive state
The reason for this is so the game doesn’t try to load minigames when there is no one to play them
Would it be necessary to have code to restart the game loop (if another player joins) after the last player leaves, because I’m unsure if a player could join in between the time the last person leaves and the time before the server shuts down?
this is just a possible edgecase im worried about