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

PP giving not working?

Asked by 9 years ago

This stopped working after I put the v.Backpack.Plyr.IceOwnedline. Any ideas why?

local MarketplaceService = Game:GetService("MarketplaceService")
local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")

CASHID = 20121128 --PUT ID HERE

MarketplaceService.ProcessReceipt = function(receiptInfo)
    local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_product_" .. receiptInfo.ProductId
    local numberBought = ds:IncrementAsync(playerProductKey, 1)
    for i,v in pairs (game.Players:GetChildren()) do
        if v.userId == receiptInfo.PlayerId then
            if receiptInfo.ProductId == CASHID then

                    game.ServerStorage.Ice:Clone().Parent = v.Backpack
                    v.Backpack.Plyr.IceOwned.Value = true
            end
        end
    end
    return Enum.ProductPurchaseDecision.PurchaseGranted 
end

1 answer

Log in to vote
0
Answered by 9 years ago

Check if that line is valid instance.

0
The output is 'doAcceptPurchase success from ypcall is true reason is nil' CardboardRocks 215 — 9y
Ad

Answer this question