#Datastores

22 messages · Page 1 of 1 (latest)

tardy fox
#

I want a PlayerData datastore with a structure like this, where a table like this is stored under every playerId:

local PlayerDataSchema = {
    General = {
        Currency = 0,
        Experience = 0
    },
    Moderation = {
        AdminStatus = "Normal",
        ModerationHistory = {},
        ModerationStatus = "None"
    },
    PurchaseLog = {}
}

I've looked up a bunch of videos about saving data, but it never mentioned saving a particular value, and they were instead pushing the entire table up to the datastore every time. Is there any way I could set the Currency to a different number without having to use the entire table?

cobalt reef
#

you would have to

#

and i believe u just index which data your trying to acess

azure wave
#

server i shot u a dm

tardy fox
#

if you know

cobalt reef
#

i dont know

tardy fox
#

it asks for a key

cobalt reef
#

but u index in the table

tardy fox
cobalt reef
#

yes and no

#

the table would be saved

#

and all you would have to do is add more data to the data store and then save it

tardy fox
cobalt reef
#

yes

lament cloud
#

By doing

#

Datastore:GetAsync(key)

tardy fox
#

which is why i was wondering if it was possible to set a value in that key

lament cloud