Crouch Clip Bug

Hey, I’m new to Unity and was messing around with player movement. I’m working on crouching right now and can’t figure out why my crouching clips me so far under the map. I’ve attached a gif to showcase the error and relevant code.

crouch_clip_bug_gf

    [Header("Crouching")]
    public float crouchSpeed;
    public float crouchYScale;
    private float startYScale;

    [Header("Ground Check")]
    public float playerHeight;
    public LayerMask whatIsGround;
    bool grounded;

    public Transform orientation;

    public Transform groundCheck;
    public float groundDistance = 0.4f;


        private void Start(){
        rb = GetComponent<Rigidbody>();
        rb.freezeRotation = true;
        readyToJump=true;
        startYScale=transform.localScale.y;
    }

  private void Update(){
        grounded = 
        Physics.CheckSphere(groundCheck.position, 
        groundDistance, whatIsGround);

        MyInput();
}
    private void MyInput(){
        //start crouch
        if(Input.GetKeyDown(crouchKey)){

            transform.localScale = new Vector3(transform.localScale.x, crouchYScale, transform.localScale.z);
            rb.AddForce(Vector3.down * 5f,ForceMode.Impulse);
        }
        if(Input.GetKeyUp(crouchKey)){
            transform.localScale = new Vector3(transform.localScale.x, startYScale, transform.localScale.z);
        }
    }