Table DataStore

game:GetService("DataStoreService"):GetDataStore("arDataStore"):SetAsync("AR-163938127", table.insert(game:GetService("DataStoreService"):GetDataStore("arDataStore"):GetAsync("AR-163938127"), "NEW INFORMATION"))

I have this information saved as a table and I would like to insert a new value into the table. How can I achieve my goal?

(P.S. the AR-NUMBERS is my player ID for command bar testing)

1 Like

table.insert returns nil.

You can use multi-line scripts in the command bar, by the way.

local store = game:GetService("DataStoreService"):GetDataStore("arDataStore")

local value = store:GetAsync("key")

table.insert(value, "data")

store:SetAsync("key", value)