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

How do I use UpdateAsync for saving a table?

Asked by 5 years ago
Edited 5 years ago

How do I update all the values from the table?

dataStoreService:UpdateAsync(playerkey, function(oldValue)
        local newValue = oldValue or 0
            newValue = newValue + 50
            return newValue
        end)

Above was example, but I don't know how to update each value from my tables list. Also, what if I wanted to save it as a string? Can I set like newValue to a string or something?

**I appreciate explanations or corrections if I had any misunderstandings! **

0
iterate through all of the members of the table :/ theking48989987 2147 — 5y
0
Really? I'll try that. Thanks! liteImpulse 47 — 5y
0
Lmao Ziffixture 6913 — 5y

Answer this question