Hello Developers!
I have a problem where when I am in the waiting place to get dropped into the map, it doesn’t drop me.
Here is the script:
local InGame = game.ReplicatedStorage.InGame
local FloorGlass = game.Workspace.GameSpawn.FloorGlass
local gameRoundTimer = 5
local roundLength = 5
local intermissionLength = 10
local InRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status
local RoundEnd = game.ReplicatedStorage.RoundEnd
local LobbySpawn = game.Workspace.LobbySpawn
local GameAreaSpawn = game.Workspace.GameSpawn.GameAreaSpawn
RoundEnd.Changed:Connect(function()
if RoundEnd == true then
Status.Value = "Game Over!"
end
end)
InGame.Changed:Connect(function()
if InGame.Value == true then
FloorGlass.Transparency = 1
FloorGlass.CanCollide = false
wait(5)
FloorGlass.Transparency = 0.5
FloorGlass.CanCollide = true
end
end)
InRound.Changed:Connect(function()
if InRound.Value == true then
for _, player in pairs(game.Players:GetPlayers()) do
local char = player.Character
char:WaitForChild("HumanoidRootPart").CFrame = GameAreaSpawn.CFrame * CFrame.new(0,3.25,0)
end
else
for _, player in pairs(game.Players:GetPlayers()) do
local char = player.Character
char:WaitForChild("HumanoidRootPart").CFrame = LobbySpawn.CFrame * CFrame.new(0,3.25,0)
end
end
end)
local function roundTimer()
while wait() do
InRound.Value = false
for i = intermissionLength, 0, -1 do
wait(1)
Status.Value = "Intermission: ".. i .." seconds left!"
InRound.Value = true
end
for i = gameRoundTimer, 0, -1 do
wait(1)
Status.Value = "Dropping Players: ".. i .." seconds left!"
InGame = true
end
for i = roundLength, 0, -1 do
wait(1)
Status.Value = "Game: ".. i .." seconds left!"
RoundEnd = true
end
end
end
spawn(roundTimer)