How can I browse Data Store. For example, I have a Data Store:
key0 value0 key1 value1 key2 value2
Can I somehow put all keys in Data Store to the table to edit it with scripts?
Yes, but you will need a separate request for each key.
local ds = --[[initialize datastore here]] local t = {} local keys = {"key0", "key1", "key2"} local numOut = #keys local errorOccurred = false for i = 1, #keys do coroutine.resume(coroutine.create(function() local key = keys[i] local success, value = pcall(function() t[key] = ds:GetAsync(key) end) numOut = numOut - 1 if not success then errorOccurred = value end end)) end while numOut > 0 do wait() end if errorOccurred then warn("Error occurred. Message: " .. errorOccurred) --Deal with the error here else --Can use 't' at this point end
Notably, you cannot browse a datastore's keys unless you're using an OrderedDataStore (which has the limitation of integer values only); you have to know what keys you're using in advance.