So I have a 6 Developer products that are for currency which is called "Points" it goes from 5 - 500 points, but anyways. I made a receipt info function that checks if any product is bought to give points. There is that one error, or warning that is making me so confused on what to change in the script, which is this: Datastore request was added to queue. if request queue fills, further requests will be dropped. try sending fewer requests.key
The script is a server script inside ServerScriptService heres the code:
local MPS = game:GetService("MarketplaceService")
MPS.ProcessReceipt = function(receiptInfo)
if receiptInfo.ProductId == 1211558636 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
wait(1)
plr.leaderstats.Points.Value = plr.leaderstats.Points.Value + 5
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo.ProductId == 1211559949 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
wait(1)
plr.leaderstats.Points.Value = plr.leaderstats.Points.Value + 25
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo.ProductId == 1211560354 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
wait(1)
plr.leaderstats.Points.Value = plr.leaderstats.Points.Value + 50
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo.ProductId == 1211560789 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
wait(1)
plr.leaderstats.Points.Value = plr.leaderstats.Points.Value + 100
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo.ProductId == 1211561139 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
wait(1)
plr.leaderstats.Points.Value = plr.leaderstats.Points.Value + 250
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo.ProductId == 1211561279 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
wait(1)
plr.leaderstats.Points.Value = plr.leaderstats.Points.Value + 500
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
Everything seems right for me, i dont even know if im gonna get answers for this question cuz the problem is so weird. well anyway that is my problem, pls ask me if u need any more information on this because i dont think i provided enough
