Game won't prompt purchase

Fixed, won’t let me delete the post for some reason

Recommend using pcall function.

local hasPass

local success,errMsg = pcall(function()
   hasPass = marketPlace:UserOwnsGamePassAsync(player.UserId,gamepassID)
end)
if success and hasPass then
 -- do your code
else
 print(errMsg)
end