I'm making a game that involves rounds, so I'm trying to make it so the script only starts the round if there are 5 or more people in the game. If there isn't, I'd like to make it say "waiting for players...". The problem is, even if there are 5+ people, it still says "waiting for players". I can't figure out how to fix this script. Output says-[string "maps = {"Round"}..."]:29: 'end' expected (to close 'while' at line 18) near ''

maps = {"Round"}

Positions = {}
Winners = {}
local Players = game:GetService('Players')
local ReplicatedStorage = game:GetService('ReplicatedStorage')
intermission = 7
timebeforeroundstarts = 5
Roundwait = 6

	function m(update)
	local c = game.Players:GetChildren()
	for i=1, #c do
		c[i].PlayerGui.InformationGui.loltext.Text = "" .. update
	end
end

while wait() do
	if #Players:GetPlayers() <= 4 then
		m("Waiting for players...")
		end
	if #Players:GetPlayers() >= 5 then
		wait(1)
		for i=1, intermission do
		m("Intermission: " .. intermission - i)

	end
end
	

1 comment