Gap between 'seamless' parallax background

I have two planes forming my parallax background. They are position above each other and scroll from the top to the bottom over the y-axis.

The first pass is ok because I positioned them in the editor so that there is no space between them.

However, the second pass there is a gap between them. They are not joined together anymore.

The third pass is perfect again (maybe because they are back in the original starting position?)

And then it switches between gap - no gap - gap - no gap - …

If I increase the speed, the gaps get bigger.

This script is attached to both planes:

using UnityEngine;
using System.Collections;

public class ParallaxHolder : MonoBehaviour {
		
	public float speed;

	void Update () {
		float amountToMove = speed * Time.deltaTime;
		
		transform.Translate( Vector3.down * amountToMove, Space.World );
		
		if( transform.position.y < -50 ){
			
			transform.position = new Vector3( transform.position.x, 130, transform.position.z );
			
		}
	}
}

How can i fix this?

PS: I’ve also tried the parallax script from Purdyjo’s (http://purdyjotut.blogspot.be/2011/02/building-game-in-unity-part-2-basic.html), because it takes the ‘current’ location and object size into account. But it has the same behaviour

I know it’s been many years but I have a solution for that specific script, maybe it can help others.

Move the Translate piece of code after the condition where you set the new position