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

How does UpdateAsync() work in Data Stores?

So I have a datastore, when I need to update it I get the datastore, which is a nested array, then I change whatever is inside it and save it in the datastore again.

It looks like this: http://prntscr.com/kqifgw

I know that if you save it with SetAsync() it just overwrites the data. So if I kick someone from the guild on one server but in another it hasn't updated yet then datastore saves with the person not being kicked yet. UpdateAsync() is supposed to fix that. I just want to make sure that I understand how it works correctly that there won't be any problems with how I'm saving the datastore (Using UpdateAsync).

Thanks

1 answer

UpdateAsync() simply acts the same as SetAsync() it is intended to be used on records that already exist.

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