Character moving weirdly

it moves when it comes to its destination which it isnt supposed to do.

Here is a video of how it works and when i does its weird thing.

Here is the script for moving the character

void Update () 
{
	Vector3 myposition = GetComponent<Rigidbody> ().position;

	if (Input.GetMouseButton (0)) 
	{
		RaycastHit hit;
		Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition);
		Physics.Raycast (ray, out hit, 100.0f);
		float hitRoundX = (float)Mathf.FloorToInt (hit.point.x);
		float hitRoundZ = (float)Mathf.FloorToInt (hit.point.z);
		Target = new Vector3 (hitRoundX, 3f, hitRoundZ);
		moving = true;
	}
	Vector3 totarget = Target - myposition;
	totarget.Normalize ();

	myposition = myposition + (totarget * enemySpeed * Time.deltaTime);

	if (moving == true) 
	{
		GetComponent<Rigidbody> ().MovePosition (myposition);
	}

	if (Target == myposition) 
	{
		moving = false;
		clicks = 0;
	}
}
void OnCollisonEnter (Collision col)
{ 
	
	Destroy (gameObject);

}

}

I bet that you should have not check for (Target == myposition) since they are Vector3s and will almost never be equals. You should check for something like (Target - myposition).magnitude <= error and let the error be around 0.01fdepends on scale of your game