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

I have a couple dev products but whenever they each add 500 gems. How do i fix this?

Asked by 4 years ago

+100 gems

01local MarketplaceService = game:GetService("MarketplaceService")
02local plrs = game:GetService("Players")
03local gem500 = 985556504
04 
05local function processReceipt2(recieptInfo)
06 
07    local plr = plrs:GetPlayerByUserId(recieptInfo.PlayerId)
08    if not plr then
09        return Enum.ProductPurchaseDecision.NotProcessedYet
10    end
11 
12    if plr then
13 
14        plr.Gems.Value = plr.Gems.Value + 500
15 
View all 22 lines...

+500 gems

01local MarketplaceService = game:GetService("MarketplaceService")
02local plrs = game:GetService("Players")
03local gem500 = 985556504
04 
05local function processReceipt2(recieptInfo)
06 
07    local plr = plrs:GetPlayerByUserId(recieptInfo.PlayerId)
08    if not plr then
09        return Enum.ProductPurchaseDecision.NotProcessedYet
10    end
11 
12    if plr then
13 
14        plr.Gems.Value = plr.Gems.Value + 500
15 
View all 22 lines...

everything else works just fine, the buttons promt the right item but idk why it only gives 500

1
you just posted two identical scripts jediplocoon 877 — 4y
0
Because both the scripts are adding 500 gems kingblaze_1000 359 — 4y
0
oh no that was an accident. itshydro7 1 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

this was supposed to be the first one sorry

01local MarketplaceService = game:GetService("MarketplaceService")
02local plrs = game:GetService("Players")
03local id = 985264450
04 
05local function processReceipt(recieptInfo)
06 
07    local plr = plrs:GetPlayerByUserId(recieptInfo.PlayerId)
08    if not plr then
09        return Enum.ProductPurchaseDecision.NotProcessedYet
10    end
11 
12    if plr then
13 
14        plr.Gems.Value = plr.Gems.Value + 100
15 
View all 22 lines...
Ad

Answer this question