This function is a function that is used in MarketplaceService to give the player their items after purchasing the Dev Product. I keep getting the "Error: Request was throttled" error and I have no idea what is going on. In the Client side code I do have a debounce for it, but this seems like a server thing since it prints in the Server Log. Any help?
Code:
local BP_IDs = {
[118328125] = 25,
[118333639] = 100,
[118341717] = 500,
[118330826] = 1000
}
local Memb_IDs = {
[118681940] = "OneMonth",
[118807556] = "ThreeMonths",
[118807670] = "SixMonths",
[118807753] = "OneYear"
}
Marketplace.ProcessReceipt = function(info)
local player = game.Players:GetPlayerByUserId(info.PlayerId)
if not player then
return Enum.ProductPurchaseDecision.NotProcessedYet
end
local leads = player.leaderstats
if info.ProductId == 52255071 then --// Add Song DevProduct ID
Events.Music:FireClient(player, "AddSongSuccess", {"We good"})
elseif Memb_IDs[info.ProductId] then
PlayerInformation[player.Name].Membership.Value = Memb_IDs[info.ProductId]
PlayerInformation[player.Name].Membership.DateCreated.Value = os.time()
givePremiumItems(player)
elseif BP_IDs[info.ProductId] then
PlayerInformation[player.Name].BakerPoints.Value = PlayerInformation[player.Name].BakerPoints.Value + BP_IDs[info.ProductId]
leads["Baker Points"].Value = leads["Baker Points"].Value + BP_IDs[info.ProductId]
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end

1 comment
The thing is, it doesn't work period. Like, I tried to buy it, watched the console, it repeated that warning like 8 times which shouldn't be possible as there is a 1 second debounce on the client side... I'm honestly sooo confused by this error.