Please Help me with this I am confused?
-- Put the ID of the DevProduct in place of 19184765
local bloxyColaId = 19184765
-- When a player clicks on the sphere, they will be asked if they wish to purchase the DevProduct
script.Parent.ClickDetector.MouseClick:connect(function(player)
Game:GetService("MarketplaceService"):PromptProductPurchase(player, bloxyColaId)
end)
-- define function that will be called when purchase finished
MarketplaceService.ProcessReceipt = function(receiptInfo)
-- find the player based on the PlayerId in receiptInfo
for i, player in ipairs(game.Players:GetChildren()) do
end
end
if player.userId == receiptInfo.PlayerId then
if receiptInfo.ProductId == productId then
Player.leaderstats.Money.Value = Player.leaderstats.Money.Value + 100
end
end
This will not work I am trying to give a player 100 Money if bought the developer Product but when I click the brick it will not pop out a buy item note? Please Help me?

3 comments
Is this in a LocalScript or regular script?
Regular Script
You have to put YOUR DevProduct's ID in place of the number there. You can't buy DevProducts from other Games. Also, it looks like some ends may be missing. Are you getting any Output from this?