So When The Countdown ends, The Both "Desert Map" and "RedMap" Load, I'm Scripting it so only one of them can load, But they load both on top of each other, Please Help!
local s = script.Stat
local Players = game:GetService("Players")
local PlayerCount = 0
game.Players.PlayerAdded:Connect(function()
PlayerCount = PlayerCount + 1
end)
game.Players.PlayerRemoving:Connect(function()
PlayerCount = PlayerCount - 1
end)
while PlayerCount < 1 do
s.Value = "We Need More Players"
repeat wait(1) until PlayerCount >= 1
end
t = 0
while true do
t = 8
repeat
t = t-1
s.Value = "Map Loading in "..t
wait(1)
until t == 0
------------------Game
local Maps = {'DesertMap','RedMap'}
local randomMap = math.random(1, #Maps)
for i,v in pairs(Maps) do
local storage = game:GetService("ReplicatedStorage")
local map = storage.Maps:WaitForChild(v):clone()
map.Parent = workspace.mapsInGame
end
t = 10
repeat
t = t-1
s.Value = t.." seconds left"
wait(1)
until t == 0
workspace.mapsInGame:ClearAllChildren()
end
function teleAll(x, y, z)
local posl = Vector3.new(game.Workspace.SpawnLocation)
for m, plr in pairs(game:GetService("Players"):GetPlayers()) do
if plr.Character then
plr.Character:MoveTo(posl)
end
end
end
s.Value = "Game Ended!"
wait(10)

4 comments
this is a duplicated thread
i already answered in the previous 1
I deleted it, Because the format was wrong, pls answer
format was the exact same. this is the 3rd time ive seen this.