Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is it possible to datastore tables?

Asked by 7 years ago

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.

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. User#5423 17 — 7y
0
Yes Shawnyg 4330 — 7y

2 answers

Log in to vote
0
Answered by 7 years ago

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

0
The only thing that DataStores doesn't support is instances arthurgps2 67 — 7y
Ad
Log in to vote
0
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
7 years ago

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

0
Can the table have edited keys? For example, {Date = "1/1/01"; Timestamp = "1:00:00"} ShadowsDev 62 — 7y

Answer this question