This script is supposed to switch between maps every 30 seconds. For some reason, it's not doing that. It's not saying anything in output, and the text gui doesn't say anything either. Help?
for i,v in pairs(game.Players:GetChildren()) do
local maps = game.ServerStorage:FindFirstChild("Maps")
local gui = v.PlayerGui:FindFirstChild("MapAnnouncer")
local guitext = gui:FindFirstChild("AnnouncerText")
while true do
wait(3)
chosenmap = maps[math.random(1, #maps)]
chosenmap.Parent = game.Workspace
guitext.Text = "Map Chosen: " ..chosenmap.Name
for i = 30, 0, -1 do
if i <= 9 then
game.Workspace.TimerCount:Play()
guitext.Text = "New game starts in: (0:0"..i..")"
else
game.Workspace.TimerCount:Play()
guitext.Text = "New game starts in: (0:"..i..")"
end
wait(1)
end
end
end
