I have a simple question regarding the title… So… DataStore1 is usually used to find/get and save the data for the player, however. I have some questions about DataStore2 that I haven’t found the api reference page talking about at all. Why would you need to use DataStore2 at all, and what does it do to your data, does it effect DataStore1 at all?
I’ve tried looking on scriptinghelpers, or browsing the devforum, but like most posts, there are people disagreeing and agreeing on certain aspects of it, I’m just looking for a few straight forward answers. I’m new, so please be easy on me!
DataStore2 is a custom library to ease the datastore handling process. You can read more about it here DataStore2, on the developer’s site. The api is also there too.
About DataStore1, I don’t know what that is. Maybe you mean simple DataStores. Roblox exposes API to interact with DataStores. DataStore2 uses that API in the background and exposes a simpler API for you.
DataStore2 is a community made addition to Roblox’s DataStore system. DataStore2 still uses Roblox’s DataStore system to save information so it’s not a complete rehaul of the system, But what I know DataStore2 for is to try and decrease the chances for data to be lost when it is saved.
I was told by a few people in large communities that DataStore2 basically returns or brings back lost data that DataStore1 didn’t save. I didn’t see anything regarding my question.
DataStore2 has the added benefit of handling errors on saving. It does not bring back lost data but it can use a special saving mode where if a save fails and the server closes then the last valid save will be loaded. In this way, there can never be a time where you lose saves completely to due server error.
EDIT: The special mode saving mode is activated by default. You can also read about it in the site I gave you: Saving Methods - DataStore2
I did not bother too much with datastores in my game. I just used DataStore2 and have never had any problems with lost saves.