Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a safe way to save data on server shutdown??

Asked by 5 years ago

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.

0
As mattscy said use BindToClose because PlayerRemoving does not fire on shutdown. User#5423 17 — 5y
0
Sorry, i should have mentioned that i am using BindToClose. PoePoeCannon 519 — 5y
0
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? PoePoeCannon 519 — 5y
0
Maybe have a little wait() or maybe two seconds or so on BindToClose User#19524 175 — 5y

Answer this question