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)
	   {
		   	if(move==1)
			{
				imageBox.active = false;
				velocity = moveDirection.normalized * speed;
				girl.animation.Play("walk");
				checkcond=1;
				print("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
				//print(girl.transform.position.x);
			}
		}
		else
		{
			print("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
			velocity = Vector3.zero;
			imageBox.active = true;
			girl.animation.Play("talk03");
		}
		rigidbody.velocity = velocity;
		transform.LookAt(new Vector3(customer.transform.position.x,transform.position.y,customer.transform.position.z));
		//transform.LookAt(target);

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.