Function "SetActorRotation " when called on the server side is being arbitrarily replicated to clients

Now I’ve already created a workaround to fix this, basically I rotated a parent component (of the character) to which this actor (weapon) was attached instead of rotating the actor on the server side.