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

Developer Product not working?

Asked by
Zyleak 70
9 years ago

I'm pretty sure this was a ROBLOX made template but it does not seen to work...

local MarketplaceService = Game:GetService("MarketplaceService")
local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")
local productId = 25097012
MarketplaceService.ProcessReceipt = function(receiptInfo) 
    for i, player in ipairs(game.Players:GetChildren()) do
        if player.userId == receiptInfo.PlayerId then
            if receiptInfo.ProductId == productId then
                game.ServerStorage.LobbyBall:Clone().Parent = game.Workspace
            end
        end
    end 
    local playerProductKey = "player_" .. receiptInfo.PlayerId .. "_purchase_" .. receiptInfo.PurchaseId
    ds:IncrementAsync(playerProductKey, 1)  
    return Enum.ProductPurchaseDecision.PurchaseGranted     
end

(No output)

0
It has to run online and the productId has to be correct. 1waffle1 2908 — 9y

Answer this question