title: Adding force to a rigidbody not working. Error: UnityEngine.Component does not contain a definition for AddForce and no extension method for AddForce
body: <p>Here is my code:</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class PlayerMovement : MonoBehaviour {
      public float moveSpeed;
      public Vector3 input;
  
  
      // Use this for initialization
      void Start () {
  
      }
  
      // Update is called once per frame
      void Update () {
          input = new Vector3(Input.GetAxis ("Horizontal"), 0, Input.GetAxis("Vertical"));
          Rigidbody2D myRigidBody = rigidbody.AddForce (input * moveSpeed);
  
      }
  }
  </code></pre>
  
  <p>I am following a tutorial shown [here](<a href="https://www.youtube.com/watch?v=qwuPiaFU37w&amp;list=PL0MyxI8F9YPGu6Nxjyv0smaaquNIPp4I-&amp;index=1]" rel="nofollow">https://www.youtube.com/watch?v=qwuPiaFU37w&amp;list=PL0MyxI8F9YPGu6Nxjyv0smaaquNIPp4I-&amp;index=1]</a> and around 27:00 he says that I don't need to reference it as it is built into Unity. I tried adding a reference and couldn't seem to get it to work either. I have tried seeing if I messed up anything with names or checkboxes etc. in the video and nothing seems to be wrong, where could I have messed up and how would I fix it?</p>
  
  <p>I am using Windows 7 and 64bit Unity.</p>