What do you want to achieve? I want to save a dictionary with all the player’s data to a datastore2
What is the issue? I have no idea how to save a dictionary to a datastore 2, I have searched it up, but for me, datastore 2 is much more complicated than normal datastore
What solutions have you tried so far? I have searched for an answer, but I don’t find anything about datastore 2 dictionary saving.
Can someone please briefly explain for me so I understand how to save a dictionary through datastore 2!
I’ve never used DataStore2, but from what I understand it uses a basic queuing/cacheing system that basically temporarily holds all data in a regular roblox table until it’s able to be successfully saved by DataStoreService.
local coinStore = DataStore2(“coins”, player) --// Equivalent to GetAsync on a “coins” datastore.
coinStore:Set(100) --// Equivalent to SetAsync, except you don’t need to provide the userId (or player?) as an argument, because you’ve already input it when you originally fetched the datastore. I recommend reading this post…
You just save it like any other value: DataStore2:Set(yourTableHere). There’s no special thing for tables.
In the future, you should use the search bar before making a new topic. The third result when you search up “Datastore2 table saving” in the search bar has an answer: How to save Dictionary using DataStore2? - #2 by PlayerHasJoined. (Dictionaries are just a type of table)
Could you maybe help me with one thing? I’ve already done my datastore but it wasn’t a datastore 2, could you help me convert it to datastore 2? I have almost no idea how it works, and I’m not giving up either.
this gave me a head start, but I don’t know where I should put the code.
Also, I will edit from table to dictionary in the topic. typo…