0%
← All insights Roblox · 7 min read

Roblox coins not saving? The usual causes (and the fixes)

Why Roblox player data stops saving — DataStore limits, missing BindToClose, race conditions and duplicate scripts — and how to fix it without wiping existing players.

"Players are losing their coins" is one of the most common Roblox bugs I am hired to fix. It almost always looks like one bug and turns out to be several stacked together. These are the usual culprits.

1. Saving only in PlayerRemoving

When a server shuts down, players can be removed faster than their saves finish. Add a game:BindToClose() handler that saves every player still in the server and waits for those saves to complete before the server closes.

2. No retries when DataStore calls fail

DataStore requests can fail or be throttled, and an unprotected SetAsync just throws. Wrap calls in pcall, retry a few times with a short wait, and log anything that still fails so you know about it.

3. Overwriting good data with empty data

If loading fails and the script carries on with default values, the next save overwrites the player's real data with zeros. Track whether a player's data loaded successfully, and never save for a player whose load failed.

4. SetAsync where UpdateAsync belongs

UpdateAsync reads the current value and writes the new one in a single step, which protects against two servers writing at once — a real risk when a player hops between servers quickly.

5. Duplicate or conflicting scripts

A copied model or old script that also saves the same key can silently undo your saves. Search the whole place for every GetDataStore call and make sure one module owns saving.

6. Changing the data shape without migrating

Renaming a field or switching from a number to a table breaks old saves. Add a version number to saved data and convert old formats when they load, so existing players keep their progress.

7. Trusting the client

If the client can tell the server "add 100 coins", exploiters will. Coins, purchases and rewards should only ever change on the server.

Testing it properly

Test with Studio's API access turned on, across several sessions: earn, leave, rejoin, shut the server down mid-session, and check the data each time. That is how stacked bugs show themselves.

If your game is losing player data, I can trace the real causes, fix them, and migrate existing saves so nobody loses progress.

Next readBuilt your app with Lovable or Base44? A checklist before real users →
Say hello

Not ready for a full brief?

Leave your email or WhatsApp number and one line about what you need. I reply personally, usually within 24 hours. No spam.

Your details stay with me and are never sold. Privacy policy