Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Developer product, can you help?

Asked by
RubenKan 3615 Moderation Voter Administrator Community Moderator
10 years ago

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

Log in to vote
0
Answered by
3rdblox 30
10 years ago

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.

0
trust me, it is. RubenKan 3615 — 10y
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. 3rdblox 30 — 10y
0
okay, i'll try that! RubenKan 3615 — 10y
Ad

Answer this question