I currently work for a game that has data store problems. Everyday, players tell me that they lost their data.
We’ve tried making a solution. This solution is a board near spawn. It saves data every 90 seconds, and when you leave. There’s an option to restore data when needed. Members say this is broken too.
I’m not sure what can be done. Is it a ROBLOX error, or is there something wrong with the scripting?
Please provide as much detail about the situation as you can when you are requesting support on a specific topic. This thread lacks any kind of information, thus support cannot be offered. From my own perspective, this is what I am looking for:
Developer console images
What the supposed error is (developer-related or Roblox-related)
Codebase for DataStores (truncate extraneous/irrelevant code)
Any details on implementation you think would help to solve the issue (think of it like you were trying to solve someone’s question instead)
I’m going to go ahead and assume that your DataStores are most likely throttling, though I’m not quite sure what is going on because again, there is not enough information.
The most common reason for data being lost is that your system fails to get the data correctly on join, and then overwrites the player’s data with default data on autosave/leave because you aren’t registering this case correctly.
You should mark a player as “not safe to save right now” until their data has properly loaded in. That way, you aren’t accidentally overwriting their data with default data.
It could be that he forgot to implement a check that prevents data from being overwritten before it’s loaded in. Like if a player joins and leaves quickly, it may not have loaded the data in time but it’ll be saved as the player left.