Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Any way to delete recieptInfo for Dev Products after awarding what they bought?

Asked by
lomo0987 250 Moderation Voter
10 years ago

I have a script that keeps re awarding the old product.

So lets just say you buy it 5 times, and you went to buy it the 6th time.. The other 5 would be in there so you wouldn't just be getting 1X the normal amount, it would be 6X because it's also awarding them again. I wouldn't believe it would be something as simple as this?

receiptInfo.PlayerId:destory()

It would look like this if that's the case.. If I am correct, that's good if i'm not.. I will need a bit of help.

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 
                receiptInfo.PlayerId:destory()

            end
        end
    end)
end

1 answer

Log in to vote
-3
Answered by 10 years ago

Use MarketPlaceService. It's easier.

0
What do you think I am using? lomo0987 250 — 10y
0
Probably a more complex way than what I was thinking. If this is MarketplaceService, then I think I might have a more simple version... fahmisack123 385 — 10y
Ad

Answer this question