Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is it possible to datastore tables?

Is it possible to datastore a table with :SetAsync() and then read it with :GetAsync()? I want each key in my datastore to hold more than one value.

2 comments

0

They can store tables but not mixed tables or any content that does not abide by the JSON format as this is what tables are stored as behind the scenes.

0

Yes

2 answers

✓ Accepted answer

Yep. There is Im giving you a example:

dss=game:GetService('DataStoreService'):GetDataStore'Game'
dss:SetAsync('bla',{0,1,2,3,4,5,6,7,89})

it's really easy :D

1 comment

0

The only thing that DataStores doesn't support is instances

It'd be something like DataStore:SetAsync(key, {"Bob,"The","Builder",1,false,nil,{'another table'}}). Basically everything you can save in a DataStore! Wiki

1 comment

0

Can the table have edited keys? For example, {Date = "1/1/01"; Timestamp = "1:00:00"}

This discussion is preserved as it was. New answers, comments, and votes are closed.