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

(Answered)What is the new function for when selling gamepasses?

Will this work?

local productId = 8849124 
local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function() 
script.Parent:FindFirstChild("SelectionPopSound"):Play()
game:GetService("MarketplaceService"):PromptPurchase(player, productId)
end)

1 answer

I have fixed it myself instead of

game:GetService("MarketplaceService"):PromptPurchase(player, productId)

it is

game:GetService("MarketplaceService"):PromptGamePassPurchase(player, productId)

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