No errors in the dev tool. When I team myself to the awayteam, my name doesn't show up on the textlabel t1. The text is not there at all, so it is not an issue with updating my playergui. Help?
local bench = game.StarterGui.InfoGui.Frame.ABenchP
local hometeam;
local awayteam;
function GetHome()
for i, v in pairs(game.Teams:GetChildren()) do
if v:findFirstChild("home") then
return v
end
end
return nil
end
function GetAway()
for i, v in pairs(game.Teams:GetChildren()) do
if v:findFirstChild("away") then
return v
end
end
return nil
end
local away = {}
local home = {}
while true do
wait()
hometeam = GetHome();
awayteam = GetAway();
local p = game.Players:GetChildren()
for i = 1,#p do
if p[i].TeamColor == hometeam.TeamColor then
table.insert(home,p.Name)
elseif p[i].TeamColor == awayteam.TeamColor then
table.insert(away,p.Name)
end
end
wait()
end
for i = 1,#away do
local find = bench:FindFirstChild("t" ..i)
if find then
find.Text = away[i]
end
end

2 comments
So what do I do with the loop?
Just delete the "while true do" at line 27 and the end at line 40