I am trying to detect players so when there are more than two, a gui will come up with some information of a map and then take them to the map. If there is less than 1 player, a hint will come up saying you need more than 1 player. Though when I start a server with two people, the hint is still up.
while wait(.5) do
if game.Players.NumPlayers >= 2 then
ranmap = math.random(1, #maps)
wait(1)
chosen = maps[ranmap]
chosenclone = chosen:Clone()
chosenclone.Parent = game.Workspace
if chosenclone then
game.StarterGui.ScreenGui.Frame.Visible = true
game.StarterGui.ScreenGui.Frame.Map.Visible = true
game.StarterGui.ScreenGui.Frame.Madeby.Visible = true
game.StarterGui.ScreenGui.Frame.MapName.Visible = true
end
wait(5)
spawn = chosenclone.SpawnPoint
wait(5)
for i,v in pairs(game.Players:GetPlayers()) do
name = v.Name
check = game.Players.Player.Character
if check then
checkHumanoid = check:FindFirstChild("Humanoid")
if checkHumanoid then
check:MoveTo(spawn.Position)
end
end
end
else
h = Instance.new("Hint", game.Workspace)
h.Text = "You need more than 1 player to play."
end
end

3 comments
Changing it to Greater than 1 doesn't help. It is pretty much the same thing as what I put.
Try again
That won't help either. I already tried it. ">=" means greater than or equal to. ">" means greater than. They are almost the same. You made it have to be greater than one. I made it greater than or equal to 2. So it has to be above one.