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?
For ProcessReceipt to work correctly, you need to put the script in ServerScriptService.