I am currently making a game where I need teams to change, I have two teams, AFK(Really black) and InLobby(Institutional white). I have created a team change GUI. It looks like this, observe how the team color changes: https://gyazo.com/adb2ecd0511e609c7d48d999a9075a8c
Chat color:
When team is InLobby (Institutional White)
When team is AFK(Really Black)
Chat color didn’t change at all. Is this an error with my code? Here is how I position my code and what I put in the code:

Code for going AFK:
script.Parent.Parent.Parent.AFKLabel.Visible = true
end)
script.Parent.MouseLeave:Connect(function()
script.Parent.Parent.Parent.AFKLabel.Visible = false
end)
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Visible = false
script.Parent.Parent.Parent.AFK.Visible = true
script.Parent.Parent.Parent.AFKLabel.Text = "AFK"
game.Players.LocalPlayer.Neutral = false
game.Players.LocalPlayer.TeamColor = BrickColor.new("Really black")
end)
Code for playing:
script.Parent.Parent.Parent.AFKLabel.Visible = true
end)
script.Parent.MouseLeave:Connect(function()
script.Parent.Parent.Parent.AFKLabel.Visible = false
end)
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Visible = false
script.Parent.Parent.Parent.Playing.Visible = true
script.Parent.Parent.Parent.AFKLabel.Text = "Playing"
game.Players.LocalPlayer.Neutral = false
game.Players.LocalPlayer.TeamColor = BrickColor.new("Institutional white")
end)
Any ideas?