How to remove small gaps when instantiating objects next to each other while they're moving them.

I’m creating an endless runner. This is the script which deals with moving the tiles/road, there are 3 road game objects within the array. I’m getting a small gap in the road when the road is moved back to firstQueuedTile Vector variable. Not sure how to solve this issue anyone got any ideas?

private GameManager gameManagerScript;
    [SerializeField] private GameObject[] road;
    public float outOfRangeX = -100;
    public Vector3 firstQueuedTile;


    // Start is called before the first frame update
    void Start()
    {
        gameManagerScript = GameObject.Find("Game Manager").GetComponent<GameManager>();
    }

    // Update is called once per frame
    void Update()
    {
       
        for (int i = 0; i < road.Length; i++ )
        {
            road_.transform.position += (transform.right * Time.deltaTime * -gameManagerScript.speed);_

if (road*.transform.position.x <= outOfRangeX)*
{
road*.transform.position = firstQueuedTile;*
}
}

}

You are advancing the roads by Delta time each frame. This moves the roads by a variable amount depending how long it takes to draw each frame. When your road gets out of range you are setting it to an exact position, so there is no way of knowing if this will exactly line up with the other road objects. Instead you could try moving the road back a set distance:

if (road*.transform.position.x <= outOfRangeX)*

{
road_.transform.position -= Vector3.right * outOfRangeX;_
}
In this example im moving the road back by the same distance as the range you are checking for. Ideally you should move it back by the exact length of three road peices, then it should line up correctly with no gaps

Thanks so much friend, currently in work but I will try this fix when I get home!