Two and fro movement of the object at waypoints

I am having the problem in my project, where the object is move two and fro at the waypoint where she has to be stationary. Here is a bit of my code:-

if(checkcond == 0)
			{ = false;
				velocity = moveDirection.normalized * speed;
			velocity =; = true;
		rigidbody.velocity = velocity;
		transform.LookAt(new Vector3(customer.transform.position.x,transform.position.y,customer.transform.position.z));

Please help me. Thanks in advance.

So the code looks good to me. If your move variable is zero, the velocity will be a 0 vector. If you add it later on to the position, I would expect the entity not to move.

What you need to do is a litte debugging. You need to check, if the checkcond if-statement is entered, if the move variable is zero and if the zero vector is actually assigned to the velocity.

If this is all the case, you need to check if the velocity is still zero later when you use it to calculate the position. If not, you need to check why not.