Confusing DataStoreService Request Limits

Hello, just a brief enquiry. I’m testing a settings menu currently, however, whenever I save the current settings, the following warning is produced. Every occurance of “Test!” indicates a single :SetAsync() request. The issue is that after the first :SetAsync() I receive this warning despite the minimum of 60 requests per minute.

Can anyone enlighten me?
To be very clear, the :SetAsync is definitely only being called once every “Test!” output.

Can I see the code? We are unable to assist any further if we’re left blind about the method used.

We’ll need to see the code, so we can figure it out, but as it may just be a might just be a slight error in the code, but no worries. We’ll be able to sort it out in no time!

Really, really simple.

function ModifyData (Player, DataStore, NewValue)
	print("Test!")
	-- variable assignment
	local DataStore = DataStoreService:GetDataStore (DataStore)
	-- modify data
	DataStore:SetAsync (Player.UserId, NewValue)
end

Elaborate when the function is called too. I believe it is because of:
local DataStore = DataStoreService:GetDataStore(DataStore)


There are two workarounds:

  • Store the data stores in a table in the scope of the script(global) and get the data store there using the keys.
  • Caching the data(using the same method by using a table) and saving it in long intervals but also when the player leaves.

This warning is referring to the cooldown between each write request sent. Make sure you are not saving the same key within 6 seconds.

3 Likes