Hello!
I am making a round system, but whenever I playtest it, the round goes too fast and it skips the Intermission, it won’t teleport Players and won’t give them a tool
Here is the script:
local Status = game.ReplicatedStorage:WaitForChild("Values").Status
local RoundStarted = game.ReplicatedStorage:WaitForChild("Values").Round
local Winners = game.ReplicatedStorage:WaitForChild("Values").Winners
--Game Settings
local IntermissionTime = 30
local RoundTime = 90
local Intermission = false
local InRound = false
--Maps
local MapsFolder = game.ServerStorage:WaitForChild("Maps"):GetChildren()
local Map = MapsFolder[math.random(1, #MapsFolder)]:Clone()
local function Minutes(s)
return string.format("%2i:%02i", s/60%60, s%60)
end
local function RunRound()
local Players = game.Players:GetPlayers()
while wait() do
Intermission = true
for i = IntermissionTime, 1, -1 do
Status.Value = Minutes(i)
end
Status.Value = "Choosing a Map"
wait(2)
Status.Value = "Map: " .. Map.Name
Map.Parent = workspace
for i, v in pairs(Players) do
if v.Character and v.Character.PrimaryPart ~= nil then
local Teleport = Map:FindFirstChild("Spawns"):GetChildren()[math.random(1, #Map.Spawns:GetChildren())]
v.Character:SetPrimaryPartCFrame(Teleport.CFrame * CFrame.new(0, 5, 0))
Teleport:Destroy()
end
end
local CloneTool = game.ServerStorage:WaitForChild("Builder")
CloneTool.Parent = Players.Backpack
InRound = true
Intermission = false
while wait() do
for i = RoundTime, 1, -1 do
Status.Value = Minutes(i)
end
Status.Value = "Game Over"
Map:Destroy()
end
wait()
end
end
spawn(RunRound)
I don’t know what to do