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
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)

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

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

Answer this question