This script is supposed to print text if a player has a gamepass, but it just gives me this error:
GamePassId '4628742' is not of type Game Pass. Please use MarketplaceService:PlayerOwnsAsset instead.
That is the gamepass' id, so I don't get why it's not working... Any help would be appreciated.
Player=script.Parent.Parent.Parent.Parent.Parent.Parent.Parent
local gamepass = script:WaitForChild("GamePassId")
local service = game:GetService("GamePassService")
script.Parent.MouseButton1Click:connect(function()
if service:PlayerHasPass(Player,gamepass.Value) then
print("Player Has Game pass!")
end)

3 comments
Why is player ser to 10 parents?
Yes
Also I'm pretty sure that PlayerHasPass doesn't work anymore. They added a update so now game passes have there own custom ID's like badges.