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

Buy Developer Product issue?

Asked by 7 years ago
Edited 7 years ago

I want 100 coins to be given to the player when you buy the dev product but when I buy the dev product 2 times, instead giving 100 coins then another 100 coins, it gives 100 coins then 200 coins on the second purchase

wait(3)
local marketplaceService = game:GetService("MarketplaceService")
local amount = 100

marketplaceService.ProcessReceipt = function(receiptinfo)
    for i, player in pairs(game.Players:GetChildren())do
        if player.userId == receiptinfo.PlayerId then
            if receiptinfo.ProductId == 104571033 then
                player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + amount
            end
        end
    end
end
0
nvm i figured it out DrDeath_GamingYT 2 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

nvm i figured it out

Ad

Answer this question