Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why won't it show the purchase? -The answer didn't work-

Asked by 10 years ago
1local MarketplaceService = game:GetService("MarketplaceService")
2local buyButton = game.Workspace.BuyButton.SurfaceGui.TextButton
3local productId = 21248921
4 
5buyButton.MouseButton1Click:connect(function()
6    MarketplaceService:PromptProductPurchase(game.Players.LocalPlayer)
7end)

When you click the GUI it won't show the purchase. (Like stated in the title)

3 answers

Log in to vote
0
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
10 years ago

You left out the productId in PromptProductPurchase.

0
It is MarketplaceService:PromptProductIdPurchase(game.Players.LocalPlayer) iiCasual 20 — 10y
0
right? iiCasual 20 — 10y
0
It won't work iiCasual 20 — 10y
0
"You LEFT OUT the productId" 1waffle1 2908 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

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.

0
:/ It didn't work iiCasual 20 — 10y
Log in to vote
0
Answered by 10 years ago

@CyanSparkleTime

1local bloxyColaId = 21248921 local player = game.Players.LocalPlayer
2 
3function onClick() game:GetService("MarketplaceService"):PromptPurchase(player, bloxyColaId) end
4 
5script.Parent.MouseButton1Click:connect(onClick)

It didn't work ;c

Answer this question