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)

4 comments
It is MarketplaceService:PromptProductIdPurchase(game.Players.LocalPlayer)
right?
It won't work
"You LEFT OUT the productId"