Can anyone help me with my dev.Product? it does pop up, and it does sell the product to me, but it doesnt give me the cash, though the location of the cash is in the position its in below. (Both scripts are NOT in a localscript, they are both in a normal script)
SERVER SIDED:
local MarketplaceService = Game:GetService("MarketplaceService")
local productId = 19559903
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.PlayerGui.Guis.Inventory.CurCash.Value = player.PlayerGui.Guis.Inventory.CurCash.Value + 10000
end
end
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
CLIENT SIDED:
local MarketplaceService = Game:GetService("MarketplaceService")
local player = script.Parent.Parent.Parent.Parent.Parent.Parent
local productId = 19559903
script.Parent.MouseButton1Click:connect(function()
MarketplaceService:PromptProductPurchase(player, productId)
end)

3 comments
trust me, it is.
Try running player.PlayerGui.Guis.Inventory.CurCash.Value = player.PlayerGui.Guis.Inventory.CurCash.Value + 10000 outside of the script and see what happens? I don't think there's any errors with the developer product system, it's what happens after the product purchase.
okay, i'll try that!