Player is not move After turn

i made a script in which player move in forward direction of z axis and this line newPosition.x = Mathf.Clamp(newPosition.x, minX, maxX); limit the player to move in x axis as isTurnPlayer is true player turn in 90 degree as now the forward direction of player is x axis but this line newPosition.x = Mathf.Clamp(newPosition.x, minX, maxX); restrict the player to move how to adjust it as player move in any direction as limit the left to right according to it

   rb.velocity = transform.forward * movementSpeed;
                Anim.SetTrigger("ismoving");
        if (isTurnPlayer == true)
        {

            Vector3 turnPlayer = new Vector3(0, 90, 0);

            if (Vector3.Distance(transform.eulerAngles, turnPlayer) > 0.01f)
            {
                transform.eulerAngles = Vector3.Lerp(transform.rotation.eulerAngles, turnPlayer, Time.deltaTime);
            }
            else
            {
                transform.eulerAngles = turnPlayer;
                isTurnPlayer = false;
            }
        }
        float horMovement = 0f;

#if UNITY_EDITOR
horMovement = Input.GetAxis(“Horizontal”);
#elif UNITY_ANDROID
horMovement = CrossPlatformInputManager.GetAxis(“Horizontal”);
#endif
Vector3 newPosition = transform.position + (Vector3.right * horMovement * horSpeed * Time.deltaTime);
newPosition.x = Mathf.Clamp(newPosition.x, minX, maxX);
transform.position = Vector3.Lerp(transform.position, newPosition, smoothVal * Time.fixedDeltaTime);