Donation Board (data store)

I am trying to used two Donation board models in my game but they little buggy and have an error.

i have this error(warn): DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key = 368846099 and its spamming it every few second.

and i have an issue that when you press on the 100k and 10k donation its not working some times when i test but its working sometimes too.

model:Boards - Roblox

please check the model and help me im dont know what to do. Thanks

As stated here, and as the error explains, you’re likely saving/requesting data too fast.

i tried its not working please help me

How often are you sending requests?

i dont know its a long script its not mine its a free model please check the free model that i send.

I can’t help if you don’t know your own script.
The free model has problems - if you don’t know what’s going on, you won’t know what to fix and how.

so help me im a new scripter please

I literally just said I can’t help you if you don’t know what your script is.

That’s like trying to fix a car without knowing anything about cars.

Your error is with your datastore. You’re sending requests too fast, slow it down.
If you don’t know datastores, you won’t be able to fix it.

just tell how i slow it down there is a lots of requests i dont know i think this is the right script:

local Blocked = {}
local Products = require(script.Parent:WaitForChild("Products"))
local Custom = false

if Products.AbortCustomPurchases then
	if Products.AbortCustomPurchases == true then
		Custom = true
		warn("Donation Board: Changing the donation board datastore is disabled if AbortCustomPurchases is true!")
	end
end

local Retriever = script:WaitForChild("Retriever")
local Datastore = game:GetService("DataStoreService"):GetDataStore("BoardData")
local Data = Datastore:GetAsync("Data")

if Data == nil then
	Data = {ListSize = 15, Datastore = 1, Refresh = 5, Version = 2}
else
	if (not Data.Version) then
		Data = {ListSize = 15, Datastore = 1, Refresh = 5, Version = 2}
		Datastore:SetAsync("Data",Data)
	elseif (Data.Version ~= 2) then
		Data = {ListSize = 15, Datastore = 1, Refresh = 5, Version = 2}
		Datastore:SetAsync("Data",Data)		
	end
end

function getOwner()
    if game.CreatorType == Enum.CreatorType.User then
        return game.CreatorId,game.Players:GetNameFromUserIdAsync(game.CreatorId)
    else
        local owningGroupInfo = game:GetService("GroupService"):GetGroupInfoAsync(game.CreatorId)
        return owningGroupInfo.Owner.Id, owningGroupInfo.Owner.Name
    end
end

function Retriever.OnServerInvoke(Player,Action,Data)
	if Action == "Authenticate" then
		local OwnerId,OwnerName = getOwner()
		if Player.userId == OwnerId then
			return true
		else 
			return false
		end
	elseif Action == "GetData" then
		local Data = Datastore:GetAsync("Data")
		if Data == nil then
			Data = {ListSize = 15, Datastore = 1, Refresh = 5, Version = 2}
		end
		return Data,Custom
	elseif Action == "SetData" then
		local OwnerId,OwnerName = getOwner()
		if Player.userId == OwnerId then		
			Datastore:SetAsync("Data",Data)
		end
	end
end

local Owner = getOwner()
if Owner then 
	if Blocked[Owner] then
		_G.DBLocked = true
	else
		_G.DBLocked = false
	end
else
	_G.DBLocked = false
end

Increase the amount of time waited before GetAsync/SetAsync/UpdateAsync is called.

However it’s not up to me to find the exact script and exact location to change it.

I’d suggest having a 90s wait before calling again for the leaderboard.