So, I am creating a game, sorta like Cookie Clicker. This is a script I used for buying clicks with developer products. I don't know if it's the problem or not, but I am not BC
Since I can't load developer products in test, I can't figure out what the problem is. Please tell me what the problem is and fix my mistake.
local productId = 22069922
local player = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Click:connect(function()
game:GetService("MarketplaceService"):PromptProductPurchase(player, productId)
end)
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.Clicks.Value = player.leaderstats.Clicks.Value + 500
end
end
end

1 comment
"Since I can't load developer products in test, I can't figure out what the problem is. "