So I need to get a players Team Color for a chat GUI that I am making. But my attempt to return it in a function, is not working. Here is my code:
function getTeamColor() game.Players.PlayerAdded:connect(function(plr) print(plr.TeamColor) return plr.TeamColor end) end getTeamColor()
My expectation was so when I join a game, it prints the Players team color, but I get nothing in the output. Please help me with this.