I made this script that is supposed to make a gui visible to a player whom owns the gamepass.
local id = 3484579
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
if game:GetService('GamePassService'):PlayerHasPass(plr,id)then
plr.PlayerGui.GamepassShop.Frame.Visible = true
end
end)?
Line 3 makes sure the gui pops up when the player joins the game and Line 4 makes sure the gui stays visible after the player resets. Also the gamepass ID is valid and the game is published, so that shouldn't be causing the issue. Also the script is in ServerScriptService.

2 comments
:connect is deprecated, maybe use :Connect. I think that might make a difference xD
You can't edit anything in the PlayerGui from a server script, you can fire a remote event to the client that handles that.