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?

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)

I am sorry for the spam, I need this to be answered. And non of the answers worked, and the thread quickly faded away

Link to the model to help you fix this! http://www.roblox.com/Developer-Product-Donate-button-Broke-Help-item?id=180309958

2 answers

Log in to vote
0
Answered by 9 years ago
GPS = game:GetService("GamePassService")
productID = 230597
button = game.Workspace.BuyButton.SurfaceGui.TextButton
button.MouseButton1Click:connect(function(player)
GPS:PromptPurchase(player,productID) 
end)
0
It didn't work ;c iiCasual 20 — 9y
0
OH WAIT! I know what's wrong. Just edited fahmisack123 385 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

Make sure to put the script inside the GUI button, if that doesn't work, I'll make you a working script.

0
it is inside a button. Look, this is the game http://www.roblox.com/Huge-update-Adventure-obby-2D-place?id=175758761 click donate iiCasual 20 — 9y
0
I clicked it, and it didn't show up, like you said. But I will make a script for you that will work :) Phirexx 5 — 9y
0
:) iiCasual 20 — 9y

Answer this question