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

01wait(3)
02local marketplaceService = game:GetService("MarketplaceService")
03local amount = 100
04 
05marketplaceService.ProcessReceipt = function(receiptinfo)
06    for i, player in pairs(game.Players:GetChildren())do
07        if player.userId == receiptinfo.PlayerId then
08            if receiptinfo.ProductId == 104571033 then
09                player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + amount
10            end
11        end
12    end
13end
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