Hello! I have a TextLabel with a LocalScript inside of it. The intention is to have the TextLabel display the players current team - for example, if they are on the Red Team, the TextLabel should say “Red Team”, and if they change to being on the Blue Team, it’ll say "Blue Team.
It works so far, but when the player switches teams, the TextLabel does not update to reflect the new team - it maintains the old team name until the player dies. I don’t want to force the player to reset to just to update this information.
Here is my current code. I originally had it handled with ElseIf statements, defining specific text, but my friend who does C++ recommended I change it to this. My code didn’t work before anyways, and actually had some errors, but I’m not quite sure why this isn’t working. I’m not getting anything in Output.
TL;DR: TextLabel is supposed to show players current team. It does not update to the proper team name until the player dies. I want it to update the second the change is made. What should I do to remedy this?