title: I want to generate obj at random places which can move in random speed in X axis
body: <p>I am working on something. In this project I want to generate a object at random position which can go left to right continuously. So far I have got this.</p>
  
  <p>This is inside start of a class that generate 50 object on which player can jump on when game loads.</p>
  
  <pre><code>void Start () {
  
  Vector2 pos = transform.position;
  
  for(int i = 0; i &lt; noOfHolder; i++)
  
  { pos.x = Random.Range(-3, 3);
  
  pos.y += Random.Range(1, 5);
  
  Instantiate(holder, pos, Quaternion.identity);
  
  }
  </code></pre>
  
  <p>and</p>
  
  <p>the holder object which is attached to it have a method.</p>
  
  <pre><code>updatePosition(){
  //moveSpeed = Random.Range(1,3);tried this
  startingPos.x = moveSpeed * Mathf.Sin(Time.time);//*moveSpeed
  
  transform.position = startingPos;}
  
  ​
  </code></pre>
  
  <p>This code can generate multiple objects. but with the same sin speed from left to right.</p>
  
  <p>I change the move speed. Some obj move to the half of the screen some full. I want all the object move to full screen with vary speed.</p>
  
  <p>Thank you for answering.</p>
  
  <p>​</p>