Hello Developers! I am trying to make a round script, but their is an error that says "Error:(12,5) Expected ‘)’ (to close '('at line 11), got ‘wait’. Also, I want it so that it selects a random map and teleports all player there. Thanks!
maps = {game.Lighting.Map1, game.Lighting.Map2, game.Lighting.Map3, game.Lighting.Map4}
--Server script under ServerScriptService
local event = game:GetService("ReplicatedStorage"):WaitForChild("ServerMessage")
--Game logic that starts intermission & stuff, but this is just a demo
while true do
game.Workspace.Sound1:Play()
for i = 30, 1, -1 do
event:FireAllClients("A new round will begin in " .. i .. "s"
wait(1)
if i == 1 then
game.Workspace.Sound1:Stop()
wait(1)
game.StarterGui.Intermission.TextLabel.Text = "Choosing map..."
wait(1)
game.StarterGui.Intermission.TextLabel.Text = "Choosing map.."
wait(1)
game.StarterGui.Intermission.TextLabel.Text = "Choosing map."
wait(1)
game.StarterGui.Intermission.TextLabel.Text = "Map: ".. math.random(1, #maps).." has been chosen"
end
end
end