title: How to move transform.y according to NGUI Slider value in Unity?
body: <p>I am making a game where I have to pick some objects with fork lifter I write this code to do this but it is not working properly. not going to desired point after the object is picked...</p>
  
  <pre><code>public UISlider Slider;
  public GameObject Lifter;
  public float temp;
  
  
  // Use this for initialization
  void Start () {
  
  }
  
  // Update is called once per frame
  void Update () {
      temp = Slider.GetComponent&lt;UISlider&gt; ().value;
      if (Slider.GetComponent&lt;UISlider&gt; ().value == 0) {
          Lifter.transform.position = new Vector3 (Lifter.transform.position.x, transform.position.y + temp - 1.2f, Lifter.transform.position.z);
      } 
      else 
      {
          Lifter.transform.position = new Vector3 (Lifter.transform.position.x, 0.39, Lifter.transform.position.z);
      }
  }
  </code></pre>