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
What does the output say? (sorry this is meant to be a comment but I'm stupid and couldn't find the comment button (It doesn't allow you to do it for the asker))
Looking at that error message, maybe you should try to run the place as a server, and check if it works outside of the studio testing mode.