#Help with Data Stores

1 messages · Page 1 of 1 (latest)

void meadow
#

I'm trying to understand them and none of the videos I watch help, it looks way too messy to me. Could someone give a quick explanation rq?

marsh horizon
#

you use datastore service

#

and then you save

hollow lily
#

Because they are pretty easy once you get to know them.

#

You basically make a data store and request it

#

You treat it basically like a dictionary in which there are key, value pairs

#

Sorry spewed nonesense there

void meadow
hollow lily
void meadow
#

cuz I try to get async and it doesnt work, i set it to a value and nah

void meadow
hollow lily
#

In game settings, security tab

#

It's a fail safe so you don't override user data on accident

hollow lily
#

Actually, send a code snippet of what are you trying to do

void meadow
#

mb i was doing smth

void meadow
void meadow
hollow lily
#

Let's get back at it

#

So at first

#

You need to request the data store by doing:

local DataStoreService = game:GetService("DataStoreService")

local DataStore = DataStoreService:GetDataStore("DataStoreName")
#

While DataStore is the name of the variable where you store the datastore

#

And DataStoreName is of course the name of the DataStore you want

#

If the datastore doesn't exist - it creates a new one.

#

Next, you use SetAsyn() to set data inside the datastore

#

While UpdateAsync() should be used to update the data inside the datastore

#

You read data from within datastore using GetAync() which returns a "page" - a dictionary pretty much but of certain size