UpdateAsync or SetAsync

That’s OnUpdate. UpdateAsync runs a function that cannot yield, passes in the old value as the only argument and expects to be returned with a new value created by the function.

SetAsync or UpdateAsync can be used to save players data for another session. It’s more preferable that UpdateAsync is used in the case that multiple instances are referencing the player’s data, in which their stuff can be overwritten.

I personally only use SetAsync to force data to stick with players, otherwise I use UpdateAsync so things are relatively streamlined across instances.

3 Likes