I have looked all over and nowhere have I found a solution, I even tried just copy and pasting from the new wiki site and altering the gamepass ID. I tried changing the ID ot the full link. I have no idea where to go from here. Reading the new way to handle gamepasses on the devforum does not address this anywhere though? The ID is always leading me to an asset not the gamepass.
-- This code should be within a 'LocalScript' object
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local gamePassID = 5327756 -- Change this to your game pass ID
-- Function to prompt purchase of the game pass
local function promptPurchase()
local player = Players.LocalPlayer
local hasPass = false
local success, message = pcall(function()
hasPass = MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamePassID)
end)
if not success then
warn("Error while checking if player has pass: " .. tostring(message))
return
end
if hasPass == true then
-- Player already owns the game pass; tell them somehow
else
-- Player does NOT own the game pass; prompt them to purchase
MarketplaceService:PromptGamePassPurchase(player, gamePassID)
end
end
Anyone know why?

3 comments
Do you have FE enabled?
^ Isn’t FE forced on for every game?
Also, the code is in a function. I don’t see anything in the code that is calling it, so I’m assuming the function won’t run at all. Try adding “promptPurchase()” below and outside the function.