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

Don't understand why reward isn't given after purchase?

Asked by 5 years ago

The script is located in the ServerScriptService, it isn't a local script. I don't understand why this script doesn't work in main game but does in alternative game with different products ids.

local MarketplaceService = game:GetService("MarketplaceService")

MarketplaceService.ProcessReceipt = function(purchaseInfo)
    local plr = game:GetService("Players"):GetPlayerByUserId(purchaseInfo.PlayerId)
    if purchaseInfo.ProductId == 349843507 then
        plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value + 100

    end
    return Enum.ProductPurchaseDecision.PurchaseGranted
end
0
product is broken? RetroGalacticGamer 331 — 5y
0
is your game filtering enabled DatRainbowTee 49 — 5y
0
Is the game published in roblox? It probably doesn't work if it's saved in your computer. awesomeipod 607 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Well I know a script that can handle that perfectly, in Toolbox search Zed’s Marketplace then click the one that is most Popular with the best logo then in the Purchase Handler put the ProductId in the DevProduct Section like this [ProductId] then under write the amount of coins for example for 200 Coins write 200

Ad

Answer this question