What is the proper way to implement replicated crouch and prone

hello I have a crouch, toggle crouch and prone system based around

 FirstPersonCameraComponent->SetRelativeLocation(FVector(CamLocationX, CamLocationY, CamLocationZ));
 GetCapsuleComponent()->SetCapsuleHalfHeight(CrouchHeight);
 GetCapsuleComponent()->SetCapsuleRadius(NormRadius);

and I wasn’t sure if this was how it should be done I really want to implement prone but not sure how to.

the easy way to implement crouching is to use the UE4 crouching system

and