I’m working on a money developer product but I’ve run into an issue. Say you buy the dev product once, it’ll give you 1000 money. Buy it again? It gives 2000 money. A third time? 3000 money. Any ideas on how to fix this? I’m new to developer products and all the tutorials I’ve watched haven’t said anything about this being a problem.
Code:
local marketPlaceService = game:GetService("MarketplaceService")
function processReceipt(info)
local player = game.Players:GetPlayerByUserId(info.PlayerId)
if player then
if info.ProductId == script.Parent.ID.Value then
player.leaderstats.Money.Value = player.leaderstats.Money.Value + script.Parent.Money.Value
end
end
end
script.Parent.MouseButton1Click:Connect(function(clicked)
marketPlaceService:PromptProductPurchase(player, script.Parent.ID.Value)
end)
marketPlaceService.ProcessReceipt = processReceipt