local MarketplaceService = game:GetService("MarketplaceService") local buyButton = game.Workspace.BuyButton.SurfaceGui.TextButton local productId = 21248921 buyButton.MouseButton1Click:connect(function() MarketplaceService:PromptProductPurchase(game.Players.LocalPlayer) end)
When you click the GUI it won't show the purchase. (Like stated in the title)
You left out the productId in PromptProductPurchase.
local bloxyColaId = 114842687 local player = game.Players.LocalPlayer
function onClick() game:GetService("MarketplaceService"):PromptPurchase(player, bloxyColaId) end
script.Parent.MouseButton1Click:connect(onClick)
-- Try that, you also need to add it into a Gui.
@CyanSparkleTime
local bloxyColaId = 21248921 local player = game.Players.LocalPlayer function onClick() game:GetService("MarketplaceService"):PromptPurchase(player, bloxyColaId) end script.Parent.MouseButton1Click:connect(onClick)
It didn't work ;c