1 | local MarketplaceService = game:GetService( "MarketplaceService" ) |
2 | local buyButton = game.Workspace.BuyButton.SurfaceGui.TextButton |
3 | local productId = 21248921 |
4 |
5 | buyButton.MouseButton 1 Click:connect( function () |
6 | MarketplaceService:PromptProductPurchase(game.Players.LocalPlayer) |
7 | 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
1 | local bloxyColaId = 21248921 local player = game.Players.LocalPlayer |
2 |
3 | function onClick() game:GetService( "MarketplaceService" ):PromptPurchase(player, bloxyColaId) end |
4 |
5 | script.Parent.MouseButton 1 Click:connect(onClick) |
It didn't work ;c