I'd like to ask a question on a hypothetical scenario before I start the process, just so I know what I can and can't do.
I have a 50 player game, so by what I understand, I can do a total of 560 GetASync() and SetAsync() per minute. (The wiki says [60 + numPlayers × 10] per minute, which would be 60 + 50 x 10 which is 560 requests per minute)
In a scenario where I save the player's amount of money into a data store every time they either reset their character or quit the game, and where I get the player's save every time they join, in a 50 player server, would that stay below the recommended amount of requests per minute?
I would assume that in a 50 player server, people would reset/join/leave about 10-20 times per minute.
Am I correct or do I have it all wrong? Please correct me if I'm wrong and explain more about the Datastores and how they work, I'm just getting started.
Thank you!!!
In most games this would probably not go over the limit, but if players are dying in your game very often then hypothetically this could go over the limit if each player were to reset every 12 seconds that would be 50 resets every 12 seconds and in one minute you would get to 600 deaths in one minute. A way that you could solve this though is by instead making the game save the player's stats only once they leave, which would bring the chances of the server request limit from going over the limit unless everyone were to suddenly begin leaving the server which is much more unlikely. I don't think that making it save only when someone leaves would make the game have any problems either. So you should try doing:
game.Players.PlayerRemoving:Connect(function(player) --Save System Here end)