target = CFrame.new(-222, 1, 130)
for i, player in ipairs(game.Players:GetChildren()) do -- By the amount of players it pairs
--Make sure the character exists and its HumanoidRootPart exists
if player.Character and player.Character:FindFirstChild("HumanoidRootPart") and **game.StarterGui.ScreenGui.TextButton.Visible = false** then
player.Character.HumanoidRootPart.CFrame = target
end
end
The bold bit is the one thing that doesn't work. All the other conditions are correct, however whenever I put the game.StartGui.ScreenGui.TextButton.Visible = false, then it doesn't work.
Any ideas on how I can embed that condition into my script? I'd be really grateful for any help.

1 comment
Thanks for the answer, dude!