I have 3 maps in a map folder each one is a model then I have this script in sever storage. I keep getting the issue sea is not a valid member of Workspace.Maps, please help
local ROUND_TIME = 10
local INTERMISSION_TIME = 5
local MIN_PLAYERS = 1
local function TeleportPlayers(cframe)
local players = Players:GetPlayers()
for i, player in pairs(players) do
if not player.Character then continue end
player.Character:PivotTo(cframe)
end
end
local function Countdown(duration)
for i = duration, 1, -1 do
print(i)
task.wait(1)
end
end
local function Intermission()
print("INTERMISSION")
TeleportPlayers(workspace.SpawnLocation.CFrame * CFrame.new(0, 2, 0))
Countdown(INTERMISSION_TIME)
end
local function RunGame()
print("GAME BEGINS")
local spawnLocation = workspace.Maps.Sea.Spawn.CFrame
TeleportPlayers(spawnLocation)
Countdown(ROUND_TIME)
end
while true do
if #Players:GetPlayers() >= MIN_PLAYERS then
Intermission()
RunGame()
else
print("WAITING FOR PLAYERS...")
task.wait(1)
end
end