What kind of Datastore should I use?

So I am going to start working on a game which involves an inventory system, equipped items/moves, currency and xp etc.

What datastore would be best, Datastore2 where I save everything in table, or just store everything in a folder inside the player.

I’m not really good at datastores, So if i was to add lets say a sword to a players inventory and store it into a table, how would you retrieve it. Would you have a for loop to check the tables items and maybe a folder of all weapons in game?

DataStore2 is just a wrapper to simplify error handling and caching, it uses Roblox’s DataStoreService in the end, so if you think you can handle all aspects on your own just use DataStoreService.

1 Like

I haven’t deep dived into the DataStore2 code, but I believe it uses a premise of an ODS and one generic DS per player - and it is evident that this is more efficient than the standard DataStore saving methods.

1 Like

Like said above, datastore2 is better for handling errors. If you are skilled in dealing with datastores to prevent minimal loss, at that point it would just be preference. You can save tables with just a normal datastore, and you don’t need datastore2 for that. Just know that datastores must have a good deal of effort put into them so that nothing bad happens which results in data being saved incorrectly, loaded incorrectly, or just lost.

1 Like