Teamcolor not updating?

The team color will not update on my scripts for some reason even though the properties change.
for example, I have this script.

while wait(1) do

yworld is a temporary place holder for my name so just pretend thats a player.

My properties will update when I want it too but this script will continue to print my default team color.

Could this be because I update my teamcolor through a local script?

Yes – because the client is changing that property without communication with the server, the server script will not know that the player’s TeamColor changed, nor will anyone else in the server.

In order to resolve this, you need to be changing the TeamColor property from a server script – if this is for a Team-Change GUI, you can communicate between the Client and the Server using RemoteEvents and have the client let the server know when the player needs to be placed onto a new team.

More info about RemoteEvents can be found on this Developer Hub article.

Yes I recognized the error and ended up fixing it, thanks for the help anyways :slight_smile:

1 Like