I am trying to add a new gamepass. However for some reason the code I use to check whether the player has the gamepass always returns false. I honestly dont know what causes it. I uploaded the gamepass hours ago, so roblox must’ve registered that i have the gamepass.
if game:GetService("GamePassService"):PlayerHasPass(p,5119145) then
game.ServerStorage.DisinfectionGrenadee:Clone().Parent = p.Backpack
game.ServerStorage.DisinfectionGrenadee:Clone().Parent = p.StarterGear
Use MarketplaceService:UserOwnsGamePassAsync now.
These changes are now live!
Last September, we mentioned an
upcoming change to Game Passes.
Since then, we have made changes to how the game passes will work. Please use the following announcement as reference for the most up to date information.
This change will not break existing games or require changes to game passes that currently exist, but you will need to follow the recommendations below for the game passes created after the new changes are live.
Here is a tutorial w…
September 11, 2018, 7:49pm
From the Developer Hub, recommended call:
-- Check if the player already owns the game pass
local success, message = pcall(function()
hasPass = MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamePassID)
i thought it had something to do with that. i just couldnt find that function on the wiki
EDIT: im dumb, i read over it