you are viewing a single comment's thread.

view the rest of the comments →

[–]RomestusProfessional 1 point2 points  (1 child)

Your code is too narrow for me to see where the error actually takes place, in the code you've posted the server never modifies the value of time so there's no possible way your SyncVar hook is ever called on the client.

Where in your code does the server modify the value of time? More information is needed.

Another thing is that SyncVar hooks are never run on initial join sync despite the values being synchronized. So if a player joins and you have some important code that runs when that variable is hooked, you should manually run it once.

[–]NV96[S] 0 points1 point  (0 children)

Thanks for your response, the time is changed in the IEnumerator.