So I’ve had this problem before! The way to do this is instead of leaving the game in-studio, you have to kick the player from the game in the command line.
This is because in the studio, when you leave/stop the game, the server and the client shutdown at the same time! This is a problem because if the server shuts down before saving the data won’t save!
If you kick the player instead, the server is still running because the player still has that kicked message. That’s why the server is able to save the data!
Heres the line you should write in the client’s command line in the studio
game.Players.LocalPlayer:Kick()