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 9 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
9 years ago

You left out the productId in PromptProductPurchase.

0
It is MarketplaceService:PromptProductIdPurchase(game.Players.LocalPlayer) iiCasual 20 — 9y
0
right? iiCasual 20 — 9y
0
It won't work iiCasual 20 — 9y
0
"You LEFT OUT the productId" 1waffle1 2908 — 9y
Ad
Log in to vote
0
Answered by 9 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 — 9y
Log in to vote
0
Answered by 9 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