Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why won't it show the Purchase?

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

✓ Accepted answer
GPS = game:GetService("GamePassService")
productID = 230597
button = game.Workspace.BuyButton.SurfaceGui.TextButton
button.MouseButton1Click:connect(function(player)
GPS:PromptPurchase(player,productID) 
end)

2 comments

0

It didn't work ;c

0

OH WAIT! I know what's wrong. Just edited

This discussion is preserved as it was. New answers, comments, and votes are closed.