#Help with Data Stores
1 messages · Page 1 of 1 (latest)
Hmm... Specify which part exactly.
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
i mean like the different keys, what's compatible, all that
What do you mean compatible?
cuz I try to get async and it doesnt work, i set it to a value and nah
it says i use an incompatible value
If you want data stores to be active in studio you need to enable them
In game settings, security tab
It's a fail safe so you don't override user data on accident
What were you trying to save into it?
Actually, send a code snippet of what are you trying to do
mb i was doing smth
I was trying to save intconstrained values and regular integers
yeah it worked for me in another thing which was really weird
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