I am a bit new to scripting so can someone help me (don't question the Obama)
elseif map:FindFirstChild("Obama") then (elseif is the error)
It stops the intermission and prevents the game from working
I'm not sure what code makes the problem and why there's a problem
The error: Expected , got 'elseif'
local status = game.ReplicatedStorage.Status
local maps = game.ReplicatedStorage.Maps:GetChildren()
while true do
for i = 1,30 do
status.Value = "Intermission "..30-i
wait(1)
end
local rand = math.random(1, #maps)
local map = maps[rand]:Clone()
map.Parent = workspace
status.Value = "map is "..map.Name
wait(4)
local players = game.Players:GetChildren()
for i = 1,#players do
if players[i].Character ~= nil then
local spawnLocation = math.random(1,#workspace.Teleports:GetChildren())
players[i].Character:MoveTo(workspace.Teleports:GetChildren()[spawnLocation].Position)
players[i].Character.Parent = workspace.Ingame
end
end
local roundLength = 999999
local canWin = true
local roundType = ""
if map:FindFirstChild("the happy home of robloxia") then
roundType = "House"
end
end
elseif map:FindFirstChild("Obama") then
roundType = "Obama"
local children = workspace.Ingame:GetChildren()
for i = 1,#children do
map:FindFirstChildWhichIsA("Tool"):Clone().Parent = child[i]
end
map:FindFirstChildWhichIsA("Tool"):Destroy()
end
repeat
roundLength = roundLength -1
status.Value = "Time Left"..roundLength
wait(1)
until roundLength == 0 or canWin == false or #workspace.Ingame:GetChildren() == 0 or (#workspace.Ingame:GetChildren() == 1 and roundType == "Obama")
if #workspace.Ingame:GetChildren() == 1 and roundType == "Obama" then
status.Value = workspace.Ingame:FindFirstChildWhichIsA("Model").Name.. " is better than u"
end
wait(3)
map:Destroy()
local players = game.Players:GetChildren()
for i = 1, #players do
if players[i].Character ~= nil then
players[i]:LoadCharacter()
end
end
I tried to fix the problem myself and by looking on google but I couldn't fix the bug Game link:

2 comments
Thank you!
Make this an accepted answer! He deserves some points for making this detailed answer.