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)
You Forgot the "p" in prompt
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:PromptProductPurchase(player, productID) -- here end)