Hi! i would like help on how to detect if there has been atleast one player character added before the game continues the round sequence. Basically, a character doesn’t spawn until they have finished a loading sequence. I’d like help on how I could change my script to begin the round sequence when atleast on character is loaded.
while true do
local players = playerService:GetPlayers()
if #players >= 1 then
intermission()
workspace:SetAttribute("Status", "Loading Map")
local maps = replicatedStorage:WaitForChild("Maps"):GetChildren()
local randomMap = maps[math.random(#maps)]
local newMap = randomMap:Clone()
currentMap = newMap
newMap.Parent = workspace
wait(1)
runGame(newMap)
else
workspace:SetAttribute("Status", "Waiting For Players")
print(#players)
task.wait(1)
end
end```