Parallax and scrolled BackGround became slow

Hi !

i have a little 2d plateformer with a background made of 2 superposed gameobject each of these two game objects have 3 sobobject image. each of these 2 gameobjects have this script attached to them :

public class Parallax : MonoBehaviour {

    public float backgroundSize;
    public float paralaxSpeed;
    public bool parallax, scroll;


    private Transform cameraTransform;
    private Transform[] layers;
    private float viewZone =10;
    private int leftIndex;
    private int rightIndex;
    private float lastCameraX;






    void Start()
    {

        cameraTransform = Camera.main.transform;
        lastCameraX = cameraTransform.position.x;
        layers = new Transform[transform.childCount];
        for (int i = 0; i < transform.childCount; i++)
        {
            layers *= transform.GetChild(i);*

}
leftIndex = 0;
rightIndex = layers.Length - 1;

}

private void Update()
{

if (parallax)
{
float deltaX = cameraTransform.position.x - lastCameraX;
transform.position += Vector3.right * (deltaX * paralaxSpeed);

}
lastCameraX = cameraTransform.position.x;

if (scroll)
{
if (cameraTransform.position.x < (layers[leftIndex].transform.position.x + viewZone))
{

ScrollLeft();
}
if (cameraTransform.position.x > (layers[rightIndex].transform.position.x - viewZone))
{

ScrollRight();

}
}

}

private void ScrollLeft()
{
Vector2 NewPos = layers[rightIndex].position;
NewPos.x = layers[leftIndex].position.x - backgroundSize;

layers[rightIndex].position = NewPos;
leftIndex = rightIndex;
rightIndex–;
if (rightIndex < 0)
rightIndex = layers.Length - 1;
}

private void ScrollRight()
{

Vector2 NewPos = layers[rightIndex].position;
NewPos.x = layers[rightIndex].position.x + backgroundSize;
layers[leftIndex].position = NewPos;
rightIndex = leftIndex;
leftIndex++;
if (leftIndex == layers.Length)
leftIndex = 0;
}

}

the problem is : after a while, the background become slow or jiggly maybe…
can someone help me ?
Trank you !

ps : i use this tutorial for this code :
Scrolling & Parallax ( Unity 2D ) - Game Mechanics - Unity 3D - YouTube

No one have an idea ? I try to find a sollution by myself but i didn’t find anything …