Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago
Edited 4 years ago

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

Log in to vote
0
Answered by 4 years ago

I have fixed it myself instead of

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

it is

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

Answer this question