In my code, I wait until there are a certain number of players and then it should continue with the rest of the script. But that isn’t working for some reason. This is my code:
local Players = game.Players:GetPlayers()
while wait() do
if #Players >= minimumPlayers then
print("Minimum players achieved")
break
else
print("Waiting for 2 players")
Status.Value = "Not enough players to start the game.."
end
end
I’ve tried printing it but it always prints “Waiting for 2 players
”. Oh and I forgot to say that minimumPlayers
is set to 2.