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

Can you directly save a table to a DataStore?

Asked by
RedCombee 585 Moderation Voter
9 years ago

So, if you have:

datastore:SetAsync("Starting11_"..player.Name)

Is there anything you can store other than simply the level's value in order to make a table out of it or would I have to separately enter all my soccer players into the data store through some other method?

0
Could you rephrase your question? What is it that you are trying to achieve? BlueTaslem 18071 — 9y

1 answer

Log in to vote
0
Answered by
1N0body 206 Moderation Voter
9 years ago

DataStore is used to transfer,share information with other servers or even save data like the simple Data persistence. What I understood, that you need 2 teams and want to save their value in which team were they? That could be simple, here's the procedure(something like it):

1.Check for any data with "GetAsync" and return the information, if there is a value set then do it from step 4 if not then go to step 2 2. Set a value for the player with "SetAsync"method(or they can choose it, however you like it.). 3. Redo from step 1(or just simply use again GetAsync to find the value) 4.Now change their team which will accord with the value which you got from the GetAsync method.

Something like this.

Ad

Answer this question