Best DataStore method?

(Please correct me if this is the incorrect category for this post)

I know there that there are multiple ways to use DataStores including DataStoreService and DataStore2

Which one would you recommend? (In a general context)

What are the advantaged and disadvantages of using each one?

2 Likes

DataStore2. There’s really no downside to using it at all. IMO it’s a lot easier than trying to use DataStores yourself. It nicely packages many, many features that make data saving a lot more reliable, and I’ve never had a case of data loss with almost 120K visits on my game. Other much larger games have also never had any data loss when using it. It’s easily the most reliable method of data saving using Roblox data stores. The next best thing would probably be a custom database solution.

One word of advice is to make sure you get it right, because it can be a little tricky before you figure it out; practice and mess around with it first to make sure you have it. One mistake can lead to data loss, and that’s what happened to me. When using DataStore2, you can be sure that data loss is pretty much never the fault of the module, it’s almost always the developer’s fault.

Thanks. I’ll keep this in mind.

DS2 unfortunately only supports saving using a Player instance for the key, which was a huge problem for me when I wanted to create a global license plate database.

2 Likes

DataStore2 has very limiting API, and that player-as-key limit is hard too. However it is player-based. It uses data store service under the hood anyways.

DataStoreService is a little more free.

If your data is player-based, use whichever. if your data is not, then use regular data store service

1 Like

I see how that would work here.

In terms of reliability Datastore2 is Pretty great, it uses “berezaa’s method”/ordered backups and caching to ensure data is saved. Considering Datastore2 uses normal datastores, Datastore2 doesn’t really not have any disadvantages the normal datastore has, I would say it “only builds on it” in a good way. As mentioned Datastore2 is player oriented/based, That being said I would reccomend using Datastore2 for certain circumstances, for when you have things like currency to save, settings or anything that needs to be saved for each player (etc.). However, I wouldn’t use it for things such as leaderboards, Using Datastore2 makes it harder or possibly even impossible to do such because of its player-oriented nature but also because if you plan to make it live updating, caching wouldn’t be in favor of that.


Overall Datastore2 is a great player-based Datastore module that uses a few different, good, saving techniques to ensure data is saved and saved reliably and efficiently (to the best that datastores allow).

5 Likes