The best way to save data is?

I saw many data saving things like: basic DataStore; DataStore 2; Profile saving and etc but i really cant choose one of them. I was using basic DataStore until i got a data loss, then i was using DataStore 2 and now im trying to use a “Profile” saving. Can someone with high-experience or just who had any experience with data saving help me with data saving styles? Please write which data saving style you used/are using, advantages and disadvantages, your self-experience with it and any tips if you have :slight_smile: Thanks to all who replies/reading.

6 Likes

Personally, I use DataStoreService with the key being the player’s user ID. I store all of the user’s data in a single table (even though that’s probably not a good idea, it is faster.) I encode the table in JSON when saving, and decode it when fetching. I usually autosave every 30 seconds and notify the player when I do.

1 Like

Personally I use datastore 2 to save values and DataStoreService to save tables and I only manipulate one table for all my game stuff, inventories, whatever, also instead of using SetAsync I recommend using UpdateAsync correctly

1 Like

I’ve been using ProfileService for 2 years now and I never had any issues with it, it’s well written and they only update it when there’s a problem with it so you won’t have to constantly change to newer versions.

profileservice, wuo it catches my attention tell me what is it? Where do I learn it, what does it do exactly?

1 Like

ProfileService is a module created by loleris the original creator of the game murder mystery.

It has cool features like session locking that prevents duping exploits, easy to configure, and vast methods for api.

1 Like

Do you know any good full guides about profile saving? I have read quick-tutorial only on their wiki

Yea there’s bunch of tutorials on youtube, loleris listed some in the OP.

1 Like

The only experience i use profile service is a bad game where i copied the code from this video: (it has a uncopylocked place)

2 Likes

I mostly use DataStore2, knowing that profile service is probably better, because it just suits my needs If I’m making a game that isn’t requiring anything complicated.

Just plain datastore2 for saving data relating to coins and exp, and using the datastore:onUpdate function to save data for global leaderboards, and to fire remote events to update the player’s UI.

And then I just forget about it. As I don’t really need to make changes again.

It really boils down to not wanting to write my own data interface when using ProfileService,
I also dont really know the In-depth reasons why ProfileService is so much better and it makes it seem like extra effort.

Now If i were to make a more complex game with an in-game economy depending on the value of items and trading, then I’d look into using it. I don’t think Datastore2 has received an update since 2021, so its a little outdated, and also item duplication protection does sound nice after all.

2 Likes

There isn’t a best way to save data, only efficient ways to do it.

Modules like DataStore2, and ProfileService use DataStoreService, and just Handle the Data efficiently, which is why there is little to none data loss when it comes to using them. You would also do multiple checks to make sure specific conditions do not occur so the DataStore can function Properly

If you really want to, you can make your own system, which people would recommend if you want specific functionallity for your DataStores which would more so involve you Attempting to Send a Request a Couple of Times (not too many times), and if it fails, you kick the Player.

1 Like