So I have this script in my game, when you click a button gui, a prompt should appear and ask if you want to purchase the developer product.
Well, this doesn't work. The prompt does not appear. Any help? It's on a server script. Thanks.
local plr = script.Parent.Parent.Parent.Parent.Parent local link = game:GetService("MarketplaceService") deb = 0 script.Parent.MouseButton1Click:connect(function() local marketId = 102107544 --ID OF YOUR DEVELOPER PRODUCT link:PromptProductPurchase(plr,marketId) link.ProcessReceipt = function(receiptInfo) if Enum.ProductPurchaseDecision.PurchaseGranted and receiptInfo.PlayerId == plr.userId then if deb == 0 then deb = 1 plr.leaderstats.Candy.Value = plr.leaderstats.Candy.Value + 100 wait(1) deb = 0 end end end end)
Refer to this ROBLOX Wiki article here. This should help you a lot. Please accept my answer if this helped!