"PlayerRemoving" Value Save // Auto save a lot of value

Hello !!

I’m actualy working on a simulator game and i’m using a lot of values. There is actualy +100 values in my game and i will add a lot more.

1) Using “PlayerRemoving” is’nt safe to save datastore values?
Someone tell me if a player is kicked for innactivity or lost conexion or anything else, this is not count as a “PlayerRemoving” so values are not saved and he lost all his progression. Is it true ?

2) If the “PlayerRemoving” isn’t safe to save a lot of value, how do i can save a lot of values?
When i’m trying to save all values every 2min - 5min, i always get a warning multiple time due to the amount of value who need to be saved.
“Datastore request was added to queue. If request queue fills, further request will be dropped. Try sending fewer request.”

Thanks for reading, hope someone can help me with that.

Yes this is true, PlayerRemoving will not fire in situations where connection is lost abruptly. Make sure you’re using tables to save your data in. I would save every 5-10 minutes on top of saving data when players buy Developer Products or if you’re game has a trading system always save after a trade as to avoid duplication bugs.

It might help to go through your game and determine what data is the most crucial data to be saved and ensure you can prioritize that data. And then build your auto save durations based off of that to ensure you don’t make to many requests.

1 Like

Just save all of the values into a table, then you can save the data every minute.

1 Like

Thanks for your help guys !

save all of the values into a table / Make sure you’re using tables to save your data in
That literally help me a lot thanks !

Yes this is true, PlayerRemoving will not fire in situations where connection is lost abruptly
Thank for confirming me this info !

saving data when players buy Developer Products or if you’re game has a trading system always save after a trade as to avoid duplication bugs.
Yeah that’s true, it will secure my data for important things if players are kicked. Thanks !