Move a gameobject diagonally towards target,

I’ve been having a problem with this, i can’t seem to move a gameobject diagonally towards a certain target between two points,i’ve tried positioning the gameobject using rotation but nothing seems to work and it never aligns with the path

	void Start()
	{
		
		transform.position = points [0].transform.position;
		time = Time.time;

		endPosition = points [1].transform.position;
		float pathlength = Vector3.Distance(startPosition,endPosition);
		angle = Vector3.Angle (startPosition, endPosition);
		transform.Rotate ((angle+-90)*Vector3.down);

	}


	void move()
	{
		
		Vector3 a = Quaternion.Euler(angle,0,0) * (Vector3.down + Vector3.left);

		if (!(gameObject.transform.position.Equals(endPosition))) {

				transform.position += a * Time.deltatime;

		} else if(gameObject.transform.position.Equals(endPosition))
		
		{
				

			// add health script here
			Destroy (gameObject);
		}

	}
		
	void FixedUpdate()
	{
     
		move ();

	}

,

Try this code

public class MovePointToPoint : MonoBehaviour {
	public Transform StartPoint;
	public Transform EndPoint;
	public float Speed;

	// Use this for initialization
	void Start () {
		transform.position = StartPoint.position;
	}
	
	// Update is called once per frame
	void Update () {
		if(transform.position != EndPoint.position) {
			float step = Speed * Time.deltaTime;
			transform.position = Vector3.MoveTowards(transform.position, EndPoint.position, step);
		}
		
	}
}