I am trying to do something with a gui if there are 2 or more players in game. That stuff is under the if statement. If there is only 1 player in the game, a hint is supposed to come up saying you need more than 1 player. Though when I start a server with 2 players, on the first player's screen the hint is up, but the second player's screen, the gui is up but nothing is happening.
maps = game.ServerStorage:GetChildren()
local player = game:GetService"Players".LocalPlayer
local guis = player:WaitForChild"PlayerGui"
if game.Players.NumPlayers >= 2 then
guis.ScreenGui.Frame.Map.Visible = false
guis.ScreenGui.Frame.Madeby.Visible = false
wait(3)
ranmap = math.random(1, #maps)
guis.ScreenGui.Frame.Visible = true
guis.ScreenGui.Frame.Beingchosen.Visible = true
wait(1)
chosen = maps[ranmap]
chosenclone = chosen:Clone()
chosenclone.Parent = game.Workspace
guis.ScreenGui.Frame.Map.Visible = true
guis.ScreenGui.Frame.Madeby.Visible = true
guis.ScreenGui.Frame.Madeby.Text = "Map is " .. chosen.Name .. " By: Spoookd"
wait(5)
spawn = chosenclone.SpawnPoint
for i,v in pairs(game.Players:GetPlayers()) do
name = v.Name
check = game.Workspace:FindFirstChild(name)
if check then
checkHumanoid = check:FindFirstChild("Humanoid")
if checkHumanoid then
check:MoveTo(spawn.Position)
end
end
guis.ScreenGui.Frame.Visible = false
end
end
guis.ScreenGui.Frame.Visible = false
h = Instance.new("Hint", game.Workspace)
h.Text = "You need more than 1 player to play."

2 comments
NOT 100% sure, but I think it's a loading issue. Try adding a wait for the player (not the character)
So where should I put the wait?