Extending the tutorial: How can I change the color of a bullet?

I just went through the entire multiplayer tutorial, and have been trying to add some extra functionality, but for the life of me I can’t figure it out: how can I make the bullets that spawn change color according to the player that shot them?

I can get it to work on the host machine, but not on any of the connected clients (which leads me to believe the solution might have to do with SyncVars and hooks).

Try using a SyncVar color on the bullet. On the server instantiate the bullet, set the bullet color, and spawn the bullet.

Hooks will not work because they are only called when a SyncVar is changed after initialization… so if the color of the bullet is never going to change the hook will never be called. Instead set the render color during Start() equal to the SyncVar.