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

How would I simplify this datastore to only use one :GetAsync()?

Asked by
3dsonicdx 163
8 years ago

So I'm using GetAsync to get values individually from a table stored in the datastore.

wins.Value=datas:GetAsync(key)[1]
-- Is basically what I'm doing for every single value.

How would I use GetAsync on the entire table all at once - and then copy it over to each value so that I only use one GetAsync?

1 answer

Log in to vote
2
Answered by
Pyrondon 2089 Game Jam Winner Moderation Voter Community Moderator
8 years ago

Like this.

local data = datas:GetAsync(key)
wins.Value = data[1]

Hope this helped.

0
Thank you friend 3dsonicdx 163 — 8y
0
No problem. Pyrondon 2089 — 8y
Ad

Answer this question