My Datastores work fine until i shut down a server... Then things go mad.
Is there a way that people usually go about saving data on server shutdown? Not sure if there is a common practice on this kind of thing or not.
My Datastores work fine until i shut down a server... Then things go mad.
Is there a way that people usually go about saving data on server shutdown? Not sure if there is a common practice on this kind of thing or not.
This discussion is preserved as it was. New answers, comments, and votes are closed.
5 comments
Are you using BindToClose? https://wiki.roblox.com/index.php?title=API:Class/DataModel/BindToClose
As mattscy said use BindToClose because PlayerRemoving does not fire on shutdown.
Sorry, i should have mentioned that i am using BindToClose.
I noticed that some players data got saved on server shutdown even before i had BindToClose in my game though. So I'm wondering if for some players it tries saving their data twice really quickly?
Maybe have a little wait() or maybe two seconds or so on BindToClose