So, the script is supposed to check if a player has a gamepass, and if it does, it makes a textbutton that tps them to a room visible. The problem with the script is it is always visible, even though I make the textbutton not visible.
The script is located inside of StarterGUI>TeleportGUI
local id = 216703799
game.Players.PlayerAdded:connect(function(yaboi)
yaboi.CharacterAdded:connect(function(character)
if game:GetService("GamePassService"):PlayerHasPass(yaboi, id) then
script.Parent.TeleportButton.Visible = true
else
script.Parent.TeleportButton.Visible = false
end
end)
end)

1 comment
Whats the error?