This has been solved so I am deleting the contents of this post.
Do you get it when calling the GetAsync or SetAsync?
Either way, that error normally appears when you’re making too many requests of that type and you just need to reduce the number of times you call it.
(Looking at your code though, I don’t see what could be causing it…)
You’re basically saving data/loading data too quickly (less than 6 seconds cooldown). More info in this post.
I get it when calling SetAsync.
Found it
for i, v in pairs(player.Inventory:GetAttributes()) do
data[i] = v
DataStore:SetAsync("InventoryTest"..player.UserId, data)
print("Data has been saved.")
end
You’re going through all the attributes in their inventory and then setting the data[i] = v, as well as saving all the current data each time.
Move the end before the DataStore:SetAsync()
Thank you very much. It works now.
No problem! Glad you were able to get it solved!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.