I Can’t Figure Out How To Make The RoundLength 0 and make the round end and go to intermission, maybe using the InRound.Value? Can Someone Please Help Me Fill This In?
local roundLength = 120
local intermissionLength = 15
local Teams = game:GetService(“Teams”)
local Players = game:GetService(“Players”)
local InRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status
local killerWeapon = game.ServerStorage.Gun
local plrs = game.Players
local survivors = {}
local plr = game.Players
local LobbySpawn = game.Workspace.LobbySpawn
local GameAreaSpawn = game.Workspace.GameAreaSpawn
InRound.Changed:Connect(function()
wait(1)
if InRound.Value == true then
for _, player in pairs(game.Players:GetChildren()) do
local char = player.Character
char.HumanoidRootPart.CFrame = GameAreaSpawn.CFrame
end
else
for _, player in pairs(game.Players:GetChildren()) do
local char = player.Character
char.HumanoidRootPart.CFrame = LobbySpawn.CFrame
end
end
end)
local function roundTimer()
while wait() do
for i = intermissionLength, 1, -1 do
InRound.Value = false
wait(1)
Status.Value = “Intermission: “… i …” seconds left!”
end
for i = roundLength, 1, -1 do
InRound.Value = true
wait(1)
Status.Value = “Game: “… i …” seconds left!”
end
end
end
spawn (roundTimer)
while wait(17) do
wait(5)
local chosen = plrs:GetPlayers() [math.random(1, #plrs:GetPlayers())]
chosen.PlayerGui.Picker.Background.RoleGiven.Text = ("Murderer")
chosen.PlayerGui.Picker.Background.RoleGiven.TextColor3 = Color3.fromRGB(255,0,0)
chosen.PlayerGui.Picker.Background.Visible = true
chosen.Team = game:GetService("Teams").Murderer --here
killerWeapon:Clone().Parent = chosen.Backpack
for i, plr in pairs(plrs:GetPlayers()) do
if plr ~= chosen then
table.insert(survivors, plr)
plr.PlayerGui.Picker.Background.RoleGiven.Text = ("Survivor")
plr.PlayerGui.Picker.Background.RoleGiven.TextColor3 = Color3.fromRGB(0,255,0)
plr.Team = game:GetService("Teams").Survivor --here
plr.PlayerGui.Picker.Background.Visible = true
end
end
wait(115)
break
end
local Team = game:GetService(“Teams”).Survivor
wait(22)
Team.PlayerRemoved:Connect(function()
if #Team:GetPlayers() == 0 then
end
end)