If I Like Restart Sometimes: The Command Just Loops or Maps Don't Load?
I'm Having A Different Problem Everytime I Reset Server, Help Please. Have I Done Something Wrong with End statments?
local s = script.Stat
---------------------------------------
---------------INTERMISSION-----------------------
t = 0
while true do
t= 8
repeat
t= t-1
s.Value = "Next Game Starting in "..t
wait(1)
until t == 0
-------------------- TELEPORT THEM TO GAME------------
game.Workspace.Gravity = 30
local Maps = {'Forest','Lava','ToxicGas','Laser','Ice'}
local randomMap = math.random(1, #Maps)
for i,v in pairs(Maps) do
if randomMap == i then
local storage = game:GetService("ReplicatedStorage")
local map = storage.Maps:WaitForChild(v):Clone()
map.Parent = workspace.MapPlaying
wait(1)
target = CFrame.new(137, 190.5, 188)
for i, player in pairs(game.Players:GetChildren()) do
player.Character.UpperTorso.CFrame = target
end
end
-------------------------------------------
t = 5
repeat
t= t-1
s.Value = "Dropping Down In "..t
wait(1)
until t == 0
game.Workspace.Game.Roof.CanCollide = false
game.Workspace.Game.Roof.Transparency = 1
end
t = 10
repeat
t= t-1
s.Value = t.." Seconds Left To Complete Level"
wait(1)
until t == 0
target = CFrame.new(-250, 2.19, 158)
for i, player in pairs(game.Players:GetChildren()) do
player.Character.UpperTorso.CFrame = target
--add an offset of 5 for each character
end
game.Workspace.Gravity = 180
game.Workspace.MapPlaying:ClearAllChildren()
--------------------- Teleport Players To LOBBY-------------
game.Workspace.Game.Roof.CanCollide = true
game.Workspace.Game.Roof.Transparency = 0.6
wait(1)
s.Value = "Game Ended"
end
---------------- RESTORE------------------
wait(4)

3 comments
Thank You So Much, Can You Tell Me When I Have To Place The Ends?
Well first you should learn how to tab correctly. Google it. Your end placement should always be on the same column as the function/loop/if that your ending with. In other words, for each function, while loop, for loop, and if statement, you need an 'end' to it.
Well first you should learn how to tab correctly. Google it. Your end placement should always be on the same column as the function/loop/if that your ending with. In other words, for each function, while loop, for loop, and if statement, you need an 'end' to it.