title: Unity: The variable rb of Movement has not been assigned
body: <p>I'm new to Unity and I'm following <a href="https://www.youtube.com/watch?v=Au8oX5pu5u4&amp;index=4&amp;list=PLPV2KyIb3jR5QFsefuO2RlAgWEz6EvVi6" rel="nofollow noreferrer">this tutorial</a>. The error I face when I try to execute to code, which is supposed to move the player left and right is:</p>
  
  <pre><code>UnassignedReferenceException: The variable rb of Movement has not been assigned.
  You probably need to assign the rb variable of the Movement script in the inspector.
  UnityEngine.Rigidbody.AddForce (UnityEngine.Vector3 force, UnityEngine.ForceMode mode) &lt;0x3cc39790 + 0x00062&gt; in &lt;31353b3f2d2e434595cbfe07fbec4072&gt;:0
  UnityEngine.Rigidbody.AddForce (System.Single x, System.Single y, System.Single z) (at C:/buildslave/unity/build/Runtime/Dynamics/ScriptBindings/Dynamics.bindings.cs:176)
  Movement.FixedUpdate () (at Assets/Movement.cs:17)
  </code></pre>
  
  <p>How to fix it because the player does  not move?
  <a href="https://i.stack.imgur.com/PwZGx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PwZGx.png" alt=""></a></p>
  
  <p><a href="https://i.stack.imgur.com/6hCfb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6hCfb.png" alt=""></a></p>
  
  <p>Movement script:</p>
  
  <pre><code>   using UnityEngine;
  
  public class Movement : MonoBehaviour
  {
  
      // This is a reference to the Rigidbody component called "rb"
      public Rigidbody rb;
      public float forwardForce = 2000f;  // Variable that determines the forward force
      public float sidewaysForce = 500f;  // Variable that determines the sideways force
  
      // We marked this as "Fixed"Update because we
      // are using it to mess with physics.
      void FixedUpdate()
      {
          // Add a forward force
          rb.AddForce(0, 0, forwardForce * Time.deltaTime);
  
          if (Input.GetKey("d"))  // If the player is pressing the "d" key
          {
              // Add a force to the right
              rb.AddForce(sidewaysForce * Time.deltaTime, 0, 0);
          }
  
          if (Input.GetKey("a"))  // If the player is pressing the "a" key
          {
              // Add a force to the left
              rb.AddForce(-sidewaysForce * Time.deltaTime, 0, 0);
          }
      }
  }
  </code></pre>