Server shutting down before saving

I made a saving system for my game. It works fine when I run a local server on my computer but it doesn’t when I run it in studio or in the published game. I’m pretty sure this is because the server shuts down before the data is saved. Has anyone else had this issue? Is there a way to not make the server shut down the moment the last player leaves?

You can use game:BindToClose() which detects when the server is shutdown.

1 Like