So im making a GUI for my gamepass on my game. And when I test it out, theres an error in my output saying "PromptProductPurchase is not a valid member of Marketplace Service". I don't know what im doing wrong. heres my script, I think the error is on line 12
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local productID = 9134966
local button = script.Parent
button.MouseButton1Down:Connect(function()
local player = Players.LocalPlayer
MarketplaceService:PromtProductPurchase(player, productID)
end)

2 comments
on line 12 its
player.UserIdnotplayerThat's not true. UserIds are only needed within Async calls.