Ok for my Team Gui I have made, it seem that when I change teams and change back to the team that's meant to have the GUI the script will just do something and overall will not show the GUI. In the output section, it no longer says it is working once I change teams. Can anyone help me? This is the script. It was doing it before and I asked for help on it but this did not work.

while true do wait(0.2)

TeamName = "BIP" 

Teams = game:GetService("Teams")
Player = game.Players.LocalPlayer
Gui = nil
function TrackGui(Par,LastPar)
    if Par.ClassName=="PlayerGui" then
        Gui = LastPar
    else
        TrackGui(Par.Parent,Par)
    end
end
print("Tracking...")
TrackGui(script.Parent,nil)
print("Found the Gui! ("..Gui.Name..")")
if #Teams:GetChildren()>0 then
    for num,team in pairs(Teams:GetChildren()) do
        if string.lower(team.Name)==string.lower(TeamName) then
            if team.TeamColor~=Player.TeamColor then
                script.Parent:Destroy()
            end
        end
    end
end

end