How can i make my character move horizontally while facing the other player?


    void Update() {     ChasingPlayer(); }  void ChasingPlayer() {     if (chasing == true)     {         transform.LookAt(player.transform);  //facing player         transform.position += transform.forward * approaching * Time.deltaTime;  //going towards player     }      float distance = Vector3.Distance(transform.position, player.position);     Debug.Log(distance); //calculating the distance between player and enemy      if(distance < 10)     {         transform.position += Vector3.left * 2f * Time.deltaTime;         Debug.Log("STOP!");     } } 

I figure that i need to add Space.World in order for it to move in such a way but it keeps giving me red line. what should i do?