local id = 1228601465 game.Players.PlayerAdded:Connect(function(player) local HasPass = game:GetService("GamePassService"):PlayerHasPass(player, id) if HasPass then print("Player has badge") player.PlayerGui:WaitForChild("TeleportGui").Frame.Title.Visible = true else player.PlayerGui:WaitForChild("TeleportGui"):Destroy() end end)
My best guess would be that TeleportGUI.Frame.Visible = false rather than Frame's child. The script below should be the answer to your question.
SCRIPT
local id = 1228601465 game.Players.PlayerAdded:Connect(function(player) local HasPass = game:GetService("GamePassService"):PlayerHasPass(player, id) if HasPass then print("Player has badge") player.PlayerGui:WaitForChild("TeleportGui").Frame.Visible = true else player.PlayerGui:WaitForChild("TeleportGui"):Destroy() print("Player does not have badge") end end)
If this answered your question, make sure to upvote. Thank you!