the script will award but it won't award the correct amount after the first time you buy the same Developer Product. It's like if you buy it and it will award you 2 points, and you keep buying it it will look like this.. First - 2 Second - 4 Third - 6 Fourth - 8 And so on. it keeps going up like that. I don't know why it keeps happening. I believe it has to do with 'pointsToAward' But I don't see how it keeps doing this.
Edit: It should only be awarding 2 each time they buy it, not how it is above.
local function buyItem(button) button.MouseButton1Click:connect(function() local marketId = button["market"].Value local pointsToAward = button["points"].Value link:PromptProductPurchase(plr,marketId) link.ProcessReceipt = function(receiptInfo) if Enum.ProductPurchaseDecision.PurchaseGranted and receiptInfo.PlayerId == plr.userId then stat.Value = stat.Value + pointsToAward end end end) end
I would use a MarketplaceService instead of this, I can provide you the script, once I fixed it and if you want it.
You never turned the stat.Value to 0 to restart it. You always kept adding 2 on and on.