For my game, I save player’s base layout when they leave the game and re-load it as soon as they join. My system saves perfectly and implements auto-saving and counter-measurements to ensure no player loses their data. Recently, I’ve tried to set up my own private server system using AssetService’s CreatePlace. I found that DataStore would act extremely weirdly with players teleporting between their private server and public servers. I found that old servers completely ignored the new DataStore changes from the created server but new servers instantly recognized them. Thinking this was an issue with my own saving system, I set to work troubleshooting for a couple days. After I decided it wasn’t my system’s fault, I created a repro place to play around with DataStores across cloned places in a universe and found many interesting things.
- With 1 player in the original server and 1 player in a cloned server, updating a value using EITHER UpdateAsync or SetSync in the cloned server takes up to a full minute for OnUpdate or UpdateAsync to recognize on the main server. This is with only ONE DataStore change. With the strain of regular DataStore usage, this time goes up to several MINUTES.
- New servers are not affected by this. Changing a value on the cloned server and opening a new server on the original game completely bypasses this delay.
- Changing a value on the cloned server and then changing the value on the main server immediately sets the value on the main server to what the clone server set it to and the main server’s input isn’t recognized on either server for a long time.
For my game, this phenomenon means that a player’s progress on their private cloned server won’t be recognized by a server that has changed their data (so that they’ve played on) in the past for anywhere up to 10 minutes. This also means that if a player joins one of those servers, their progress on their private server is effectively overridden.
Here is the open-source place for reproduction:
You need at least 2 clients to test this properly. Simulating the regular stress of “saving” of a player’s data creates INSANE discrepancies.
EDIT: If you copy the place make sure to change the placeid in the serverscriptservice script and enable CreatePlace on the place