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

so we've got a problem hueston?????

Asked by 6 years ago
Edited 6 years ago

Gives player 100 cash when they buy the developer product. Why doesn't it work?

local MarketPlaceService = game:GetService("MarketplaceService")
local ProductId = 85734826 
local Cash = 100

MarketPlaceService.ProcessReceipt = function(receiptInfo)
    for i, player in ipairs (game.Players:GetChildren()) do
        if player.userId == receiptInfo.PlayerId then
            if receiptInfo.ProductId == ProductId then

                player.leaderstats.Money.Value = player.leaderstats.Money.Value + Cash
            end
        end
    end
    return Enum.ProductPurchaseDecision.PurchaseGranted
end

0
Do you have a developer pass already made? If so, are you in Studio? Admin8483 -21 — 6y
0
Don't use ipairs Goulstem 8144 — 6y
0
I have dev pass made, I am in Studio @Admin8483 IfIWasntSoSwag 98 — 6y

Answer this question