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

What can I do or change to make my datastore communicate between different places better?

Asked by 4 years ago

I'm making an RPG game, but the problem is that sometimes I will go from one place to another place within the same game, but the second place reads GetAsync faster than the previous server finishes SetAsync(or UpdateAsync as well).

I.E. I will unlock a perk, then travel to a different place(as in a different ROBLOX place connected to the same game), and I won't have the perk I just unlocked, as SetAsync didn't happen fast enough before my data already loaded.

Is there a way to force SetAsync to finish before using GetAsync in the second place?

https://pastebin.com/hzFDLDPG <--- here is basically how my saving and loading is set up

I've been recommended UpdateAsync because supposedly you don't lose data as EASILY, but either it doesn't help in this context or I'm using it wrong(almost all examples show udpates of 1 value but I'm saving an entire table and am wondering if that matters), I made a comment of what my UpdateAsync version looks like at the bottom of the paste.

Is there a way for the second place to like, HOLD UP, until SetAsync finished, then call GetAsync?

Answer this question