for (int i = 0; i < PathLength; i++) { GameObject tile = (GameObject)Instantiate(GroundTile, transform); tile.transform.position.x += 1; }