So, I will presume you made a game pass after the new game pass update. You can read more about the game pass changes here
Basically this means you can no longer use MarketplaceService to check if someone owns a game pass. NOTE: This only counts for people who made game passes AFTER the new update. Old game passes must use the MarketplaceService:UserOwnsGamePassAsync(userId, gamepassId)
To check if someone owns a game pass, you have to use GamePassService:PlayerHasPass(Player, PassId)
To solve your problem:
01 | local Players = game:GetService( "Players" ); |
02 | local GamePassService = game:GetService( "GamePassService" ); |
03 | local door = workspace.Door; |
06 | door.Touched:Connect( function (hit) |
07 | if hit and hit.Parent:FindFirstChildOfClass( "Humanoid" ) then |
08 | local player = Players:GetPlayerFromCharacter(hit.Parent); |
10 | local ownsPass = GamePassService:PlayerHasPass(player, passId) |
11 | door.CanCollide = false |