How to save a folder?

Continuing the discussion from How do I save a Folder with datastore:

  1. What do you want to achieve? Keep it simple and clear! I am making an anime game about collecting cards, that would later be cusomizable, similiar to a discord bot Karuta. But, i don’t know how to make player not lose his cards after rejoining the game - all the stats, the image and everything about the card is in its folder, and I would want the folder to be saved to datastore or something like that.

  2. What is the issue? I just have no Idea how to do it

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub? I did, but because of my not much of a experience, i didn’t come up with anything that works.

1 Like

loop through folder:GetDescendants() and use the suggestions from the topic you linked

Serialize these cards into dictionaries, then save them to a DataStore, an the deserialize it when you need to load these cards in:
Example:

{
 card_name = 'example card name here';
 card_color = '#6ecfe2';
 --// other stuff here
}

However it’s best if you just use HttpService just like Zerin107 said
I won’t type my essay but here is a detailed post that you could use
If you have any more questions then please ask
How to save parts and the idea of serialization

You can covert it into a JSON string using HttpService:JSONEncode().

local data = {} -- dictionary
dataStore:SetAsync(key, HttpService:JSONEncode(data))
1 Like