local MarketplaceService = game:GetService("MarketplaceService")
local buyButton = script.Parent
local productId = 33580693
player = game.Players.LocalPlayer
buyButton.MouseButton1Click:connect(function()
MarketplaceService:PromptProductPurchase(player, productId)
end)
MarketplaceService.ProcessReceipt = function(receiptInfo)
player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 100
return Enum.ProductPurchaseDecision.PurchaseGranted
end
When this developer product is purchased, I want the player to get 100 coins, but it doesn't work. This is in a local script, am I doing it wrong?

1 comment
ProcessReceipt can not be ran through a LocalScript. You have to have a separate script and it must be Server Sided. This may help: https://scriptinghelpers.org/questions/27112/how-do-i-use-dev-products#30658