Why doesn't the elseif part of this script not work? Everything else in the whole script works besides this one part, please help.
bin = script.Parent
function onTouched(bin)
local character = bin.Parent
local player = game.Players:GetPlayerFromCharacter(character)
local team = player.TeamColor
if character and player then
if team == BrickColor.new("Medium stone grey") then --Raider Group Color
if workspace:FindFirstChild("Active") then
end
if workspace:FindFirstChild("Camera") then
game.Workspace.Camera.Name = "Active"
game.Workspace.Light.BrickColor = team
local hint = Instance.new('Hint', workspace)
hint.Text = "Raiders have taken the base! 20 Minutes Till Raiders have won!"
wait(3)
game.Workspace.Message:Remove()
game.Workspace["Owned By: (Group Name)"].Name = "Owned By: Raiders"
game.Workspace.Glass.BrickColor = BrickColor.New("Medium stone grey") --Raider Group Color
for _, part in pairs(game.Workspace.Colors:GetChildren()) do
part.BrickColor = team
end
if workspace:FindFirstChild("Camera") then
for progress = 5, 100, 5 do
wait(60)
local hint = Instance.new('Hint', workspace)
hint.Text = progress .. "%"
end
end
elseif team == BrickColor.new("Really red") then --Main Group Team Color
if workspace:FindFirstChild("Active") then
game.Workspace.Active.Name = "Camera"
game.Workspace.Light.BrickColor = team
game.Workspace["Owned By: Raiders"].Name = "Owned By: (Group Name)" --Insert Group Name Here
local hint = Instance.new('Hint', workspace)
hint.Text = "(Group Name) has taken back the base!" --Insert Group Name Here
wait(3)
hint:Remove()
for _, part in pairs(game.Workspace.Colors:GetChildren()) do
part.BrickColor = team
end
end
end
end
end
end
bin.Touched:connect(onTouched)

2 comments
Is it erroring?
No