title: Cannot convert type "unityengine.vector3" to "float"
body: <p>I am trying to make the camera move back to the player if the camera is not in the place where it stops but I keep getting the error in the title. Here is my code:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public float minPos = 0.3234783f;
  public float maxPos = 40f;
  
  Vector3 tempPos;
  public float playerPos;
  
  private void Update() 
  {
      playerPos = GameObject.Find ("Player").transform.position;
      tempPos   = transform.position;
      tempPos.z = -10f;
  
      if (transform.position.x &lt; minPos)
           tempPos.x = minPos;
      else tempPos.x = playerPos;
  
      transform.position = tempPos;
  }
  </code></pre>
  
  <p>I'm pretty new to coding so sorry if this is a really dumb mistake.</p>