How i make with datastore2 like a pet system i mean like:
that i can add folders to the Pets Folder and it saves the pets like with all values init,
i know how to make that with normal datastores but not with datastore2
Please Help, thx
1 Like
You could save them like this:
local bear = {
Evolution = 0,
Equipped = false,
ID = 12345,
Locked = false,
}
local dog = {
Evolution = 0,
Equipped = false,
ID = 54321,
Locked = false,
}
local pets = {bear, dog}
Then just save the pets
table. Im not sure how DataStore2
works but Im sure you can save tables
yea you can but then tables in tables its hard in datastore2 idk
You can save tables with Set
, its the same thing. But I think you have to use the GetTable
method for getting tables.
but how i make it then with pets
1 Like
Iβm not really sure what you mean? You donβt need to save the bear
and dog
tables too. You just save pets
. Pets already saves the bear
and dog
things for you. Then when they rejoin, somehow get the table (As stated before not sure how this is done in DS2) and use that to set their data.
1 Like
you need to save it in a table because you need for pets the pet name, the pet id, if its equipped, crafting and more
1 Like