New clients do not get updated syncVars

Hello. I just ventured into the multiplayer aspect of my game, but I’ve run into an issue with [syncVars]. New clients that join after a syncVar is modified don’t get the updated value. They start with the default value instead. I’ll explain step by step.

-In the script, int playerCount has a default value of 0.

-Host starts server and increments playerCount by 1 in the OnStartLocalPlayer()

-New client joins. Increments playerCount by 1.

-But playerCount is still 1, meaning it was initially 0.

What I want is for new client to get latest syncVar, which is 1 and increment that to become 2.
What am I doing wrong? I’ll post the script if you need it.

PS: syncVar works well for clients that are already connected before modifications.

Hi, I’m sorry for the late reply, but here is the answer: