problem with instance

Hello everyone I wanted to achieve the effect of a background vertical continuous Move through (giving the feeling of going up). I decided to make a plane (with texure) and give the command to transition the y axis. When the plane reaches a certain coordinate should istaziarne a copy to give a sense of continuity. As for the instance I have no problems. The problem is that I clone to infinity. This is my code:

var planeBackground : GameObject;

var x : int = 0;

function Start () {

 planeBackground = GameObject.FindWithTag("Respawn");







function Update () {




if(planeBackground.transform.position.y < 1.3){













I will rightly continue to clone because it reached a coordinated derminata will always be lower. How can I fix this? Thank you =)

hello, I did not understand what you mean. I applied the script to the room but must instantiate only one time the plan each time it reaches the coordinated established. Thank you for having responded to me =)