Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Developer product, can you help?

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)

1 answer

Does your GUI update whenever its value is changed? It may be the case that you are giving the money, but the GUI isn't displaying it.

3 comments

0

trust me, it is.

0

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.

0

okay, i'll try that!

This discussion is preserved as it was. New answers, comments, and votes are closed.