Setting teams

I have a multiplayer game I have set up now each player spwans based on thier tab I’d in each location I have 4 players and they all spawn correctly now I want to set up thier teams 2vs2 for argument sake. I have tried to get each players tag and use that to set a team by passing through a branch and if true set team number to either 1 or 2 but nothing is happening I put a text widget on my screen that is binded to the players team number but they are always on 0 any help on this would be appreciated cheers