Please post code as text and put it in code tags.
All barrier move operations must be done by the owner of the barrier network object. By default, this is the server (host).
Your update calls both a Server and Client RPC which I’m surprised even works. A client should not be able to send a ClientRpc but perhaps this restriction has been lifted.
In the ServerRpc you are not assigning the position after changing it, you only change the local Vector3 variables left/rightObjPos.
I doubt that this “barrier” will have the expected effect due to time delays. Assuming both players try to move forward simultaneously, the other player will be blocked until the RPC is received. This means this won’t be fair game, and likely leads to players stuttering because they’re constantly being blocked and unblocked. If they can move at all, since the barrier won’t move until the other player moves but that player can’t move until the other player moves etc.