Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Gamepass is not a gamepass? O.o

Asked by
Lolnox 47
6 years ago
Edited 6 years ago

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
0
Try getting a gamepass script off free models and test your gamepass ID with it awesomeipod 607 — 6y
0
So I found a free model which checks is player has a pass and it causes the same error :\ Lolnox 47 — 6y
0
if* Lolnox 47 — 6y

1 answer

Log in to vote
0
Answered by
yoshi8080 445 Moderation Voter
6 years ago

Please refer to this question I have answered before regarding gamepasses. It provides some updated code with the new gamepass system.

Ad

Answer this question