So I made a round system script (mostly from Youtube), with a timer and stuff. But now I want to add something where whatever map is chosen, teleports players into THAT map. (as well as load it). Anyone know how I should do this?
I also hope to have several different spawnpoints so that everyone is scattered around the map.
Thanks!
Script:
local Players = game:GetService("Players")
local ROUND_DURATION = 60
local INTERMISSION_DURATION = 10
local MIN_PLAYERS = 1
local statusText = ""
local statusUpdate = game.ReplicatedStorage:WaitForChild("StatusQuo")
local function StartGame()
workspace:SetAttribute("gameRunning", true)
for i=ROUND_DURATION, 1, -1 do
print("Round in Progress..." .. i)
statusText = tostring(i)
statusUpdate:FireAllClients(statusText)
task.wait(1)
end
EndGame()
end
function EndGame()
workspace:SetAttribute("gameRunning", false)
end
function Intermission()
while #Players:GetPlayers() < MIN_PLAYERS do
print("Waiting For Players")
task.wait(1)
end
for i=INTERMISSION_DURATION,1,-1 do
print("INTERMISSION",i)
statusText = tostring(i)
statusUpdate:FireAllClients(statusText)
task.wait(1)
end
if #Players:GetPlayers() >= MIN_PLAYERS then
StartGame()
else
Intermission()
end
end
Intermission()