Hey, ok so, i have a surface Gui and on that surface Gui i have three textbuttons each with the same script witch is here below
~~~~~~~~~~~~~~~~~
local MarketplaceService = game:GetService("MarketplaceService") local productId = 21992025
MarketplaceService.ProcessReceipt = function(receiptInfo)
for i, player in ipairs(game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then if receiptInfo.ProductId == productId then
script.Parent.Parent.Parent.Parent.Parent.Worker_View.SurfaceGui.accept.Visible = true script.Parent.Parent.Parent.Parent.Parent.Worker_View.SurfaceGui.Frame.Frame.pick.Visible=false
wait(3) script.Parent.Parent.Parent.Parent.Parent.Worker_View.SurfaceGui.accept.Visible = false script.Parent.Parent.Parent.Parent.Parent.Worker_View.SurfaceGui.Frame.Frame.pick.Visible =true pwait.Visible = true click1.Visible = false click2.Visible = false click3.Visible = false pay1.Visible = false pay2.Visible = false pay3.Visible = false cancel.Visible = false wclick1.Visible = true wclick2.Visible = true wclick3.Visible = true ccancel.Visible = false
end end end return Enum.ProductPurchaseDecision.PurchaseGranted
end
**and in the Starterpack i have this local script **
local buyButton = game.Workspace.ComputerMechanics1.Customer_View.SurfaceGui.Frame.Pay1 local productId = 21992025
buyButton.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, productId) end)
local buyButton = game.Workspace.ComputerMechanics1.Customer_View.SurfaceGui.Frame.Pay2 local productId = 21992101
buyButton.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, productId) end)
local buyButton = game.Workspace.ComputerMechanics1.Customer_View.SurfaceGui.Frame.Pay3 local productId = 21992105
buyButton.MouseButton1Click:connect(function() game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, productId) end)
~~~~~~~~~~~~~~~~~ the problem is when someone click the first gui it prompts the developer product for them to buy and when they buy it nothing happens, same with the third gui. but when some one buys the second gui it does what i want it to do. The only error i get when i go to play the game and i go to the developer console and after i bought the developer product is RbxUtility.DecodeJSON is deprecated, please use Game:GetService("HttpService"):JSONDecode() instead
Thanks you.