Should I loop for a certain number of times checking if the player’s data has been loaded? If so, then how many times should I loop? If not, any tips on not having my data store not save data? Since two people already lost all their wins on my game.
I used to have a similar problem, the fix for me was to make two datastores, one for when player joins/leaves playerData, second one playerBackupData where the data gets saved every 60 seconds
The player joins, and the data loads from the first playerData datastore,
After 5 seconds, it gets the playerBackupData datastore, and if the value is bigger than the value set by playerData, replace it.
Maybe not the best fix, but it’s the one I use, and it’s reliable, no data lost since that update.
oh awesome, thanks. I’ll have to try that!
Also, one more thing, sorry. I added the data saving system and decided to put the data saving to 120 seconds, since my game doesn’t add money or wins to your player all the time. But to verify if something is up with their data, it’ll be on the “else” area for checking for success. I hope this works, but thank you so much!