Hello! I was browsing the devforum when I found a post about datastore2. It basically convinced me that datastore2 is needed to prevent dataloss. I want to know a couple things. First, How common is dataloss with normal datastore anyways? Is it worth it? Also, if I decide to add it to my game which is already a year in development, will I need to rewrite a lot of code(I saw a tutorial that says you need to change the dataStore when updating a stat, not the actual value.)? Thanks in advance!
Data losses don’t happen often. If your game is very popular, with a high concurrent player count, I would recommend updating your game to use Datastore2. Roblox’s datastore system is now on v2.0, which actually has an automatic versioning system to help prevent data losses. If possible, you may want to use that instead, as it may take you less time to update your game to work with Datastore 2.0.
Roblox released this post about Datastore 2.0.
Roblox’s Datastore 2.0 with versioning tutorial.
In the event of a data loss, you can revert to a previous version of your datastore.
Your datastore script may already work with Roblox Datastore 2.0
Thanks a lot! i’ll look into the links and find the easiest solution. This is my first game that I have really made, so I don’t think it’ll get a high player count, but I’ll try just in case!
Cool, good luck with your game.
For reference, both of you are talking about two different things:
DataStore2 is a system that uses Roblox’s datastores to save data. It’s a complex system that basically makes it impossible to lose data if implemented correctly.
DataStore 2.0 is Roblox’s newer datastore API (DataStore2 uses DataStore 1.0). DataStore 2.0 has some features of DataStore2, though I’d recommend DataStore2 over DataStore 2.0.
Also note that you’ll only need to use versioning if your game already has data you want to convert to a different format/datastore system.
For example, if you saved data with your own DataStore 1.0 code and wanted to switch to Datastore2, you’d need to make it so when a player joins if Datastore2 data isn’t found DataStore 1.0 data is looked for, and if that’s found it’s converted over to Datastore2 data.
Switching out Datastore 1.0 code for Datastore2 code should be fairly simple. Both serve the same functions and can store and load the same types of data.
I know that Datastore 2.0 and Datastore2 are different, but thanks for pointing it out!