Hello, in my testing place I have 2 gamepasses that are from the main game.
These passes in the code are checked for via a function and an if statement, and if they own the gamepass the script unlocks items.
The problem here as some testers have noted that also own the gamepass, is it will not return true even though the player actually does own the pass.
Even more oddly, it works fine for me and unlocks it for me every time.
(Also note: the pcall doesnt return any errors that i’ve seen so far)
Here is the code:
local function ownsgamepass(userid,gamepassid)
local s,res = pcall(marketPlaceService.UserOwnsGamePassAsync,marketPlaceService,userid,gamepassid)
if not s then
res = false
local function checkGamepasses()
if ownsgamepass(player.UserId,16825105) then
if ownsgamepass(player.UserId,17833663) then
local function ownsgamepass(userid, gamepassid)
local owns = false
local s, res = pcall(function()
owns = marketPlaceService:UserOwnsGamePassAsync(userid, gamepassid)
if s and not res then