title: I'm trying to change the motorspeed for my HingeJoint2D via script, it makes a Random value but doesn't apply it to the component
body: <p>I've been trying to change the motorspeed to a random number however it only changes it in the script component, not in the HingeJoint2D component</p>
  
  <pre><code>  public float speed;
    private HingeJoint2D hj;
  
  // Start is called before the first frame update
  void Start()
  {
      hj = GetComponent&lt;HingeJoint2D&gt;();
      speed = Random.Range(80f, 700f);
      Debug.Log(speed);
  
      hj.useMotor = true;
  
      var motor = hj.motor;
      motor.motorSpeed = speed;
  
  
  }
  </code></pre>