Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I recover lost data in a DataStore?

So I know that sometimes people lose data in a game because of DataStore, and I know that you can recover it. How would I recover lost data? I haven't started scripting a DataStore in my game yet because I'm wondering if there's a certain way to set it up for this feature.

For example: A player begins playing a game, and their in-game currency is saved through DataStore.

The player has accumulated lots of money, and they love the game. They continue to play it over and over again.

One day, the player joins the game and their money mysteriously disappears because something went wrong with DataStore. They must start out again with 0 cash.

The player does not want to play the game anymore, because they are angry that they lost their cash, and they must restart the entire game again.

How can I make it so this "Player" can maybe PM me and I can restore their data somehow with DataStore?

What methods or events could I use to help me?

2 answers

It's really rare if something like this happens (they might be lying or roblox failed again which causes all games to lose save data). Well just put a check if the player's name is that then change their stats to blah blah and save it.

I'm not so good at it but this may be right or wrong. I never tried this before but I think it goes with functions like.

saveString()
--and
loadString()

I'm not an expert at it but I think you do that and save it into data store. Thats pretty much all I know sorry!

1 comment

0

I'm talking about if the data is erased, not how to save or load data. Also, this is Data Persistence.

This discussion is preserved as it was. New answers, comments, and votes are closed.