Why isn't this script working?

I’m helping a friend out in figuring a data issue. In some servers, the data store fires like crazy. So when you leave, your profile isn’t released like it should be and basically its saving every players data when it shouldn’t be, even though the script shown below should be releasing the players profile when they leave. Is there something that is wrong with this script?

This is what the datastore looks like. If someone could help it would be greatly appreciated.

1 Like

I think the error is related to fetching the data, not saving it.

Figured it out. Profiles weren’t releasing after a player left because there was a race condition where it wouldn’t get the profile fast enough before they left, so the longer a server was up the more it would infinitely spam data. The documentation was wrong and it missed a condition that made it spam forever. Weird stuff

if you found the problem you should probably mark this as solved

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.