I'm developing a simple game which currently has one gamepass. For some reason if a player has the gamepass it doesn't work. Here's what the output says:
20:08:58.065 - GamePassId '4447283' is not of type Game Pass. Please use MarketplaceService:PlayerOwnsAsset instead. (x2)
This item is clearly a gamepass but the output always says it's not. Interestingly enough, the buy screen appears when PromptGamePassPurchase is called even though it causes output to say the same thing above.
Here is the script of a remote function if it'll help
local GamePassService = game:GetService('GamePassService')
function script.Parent.OnServerInvoke(plr, id)
if GamePassService:PlayerHasPass(plr, id) then
return true
else
return false
end
end

3 comments
Try getting a gamepass script off free models and test your gamepass ID with it
So I found a free model which checks is player has a pass and it causes the same error :\
if*