I am trying to get a button to show if a player has the gamepass but it's not working.
local id = 1308026475
game.Players.PlayerAdded:connect(function(player)
if game:GetService("GamePassService"):PlayerHasPass(player, id) then
script.Parent.Visible = true
end
end)
Please help! Thanks in advance.

2 comments
This is in a server script, right?
No it's a local script.