3 things that you’ll need to change:
make a float variable to store the time and make it a synced variable
when the OnPlayerJoined event gets called, get the animator time from master and request serialization.
when OnDeserialization gets called, set the animator time from the synced variable to sync up with the master.
And thats it in global terms. you don’t need to do this in the update loop (and I highly recommend you don’t for performance reasons). You only need to know what the animator on the room’s master/host is at and sync that whenever some one joins/leaves.
Just make sure it’s unscaled time on the animator to reduce desync issues
you’re checking if the player that joined is the master atm, which will almost always be false