# Why this courutine doesnt works?

Hi all!

I have a courutine inside a for, to check “how many tiles up my unit left to move”,and if its > 0, repeat the courutine wich moves the object by “lerping” one unit up, but it only repeats the courutine once, no matter how many tiles up it has to move. (this triggers when a “tile” object is clicked so unit moves there)

`````` public void MoveraTile(int destX, int destY)
{
Source();//Calcula posición actual.
int mueveEjeX;
int mueveEjeY;

mueveEjeX = destX - posX;
mueveEjeY = destY - posY;

Debug.Log("Tiene que moverse en X"+mueveEjeX+" y en Y "+ mueveEjeY);

for (int i = mueveEjeY; i >0; i--)//Si tiene que moverse arriba, se mueve.
{
StartCoroutine(mueve1arriba(selTrans, selTrans.position + (new Vector3(0, 1))));

}

}

IEnumerator mueve1arriba(Transform objeto, Vector3 Vecir)
{
while (Vector3.Distance(objeto.transform.position, Vecir) > 0.1)
{
objeto.transform.position = Vector3.Lerp(objeto.transform.position, Vecir, 2f*Time.deltaTime);
yield return null;
}
print("ya ta");
yield break;
}
``````

StartCouroutine() can only be called with Start()