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
02 | local marketplaceService = game:GetService( "MarketplaceService" ) |
05 | marketplaceService.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 |