It's because you're using JavaScript; `GetComponent() ` works for C#, but not JS. You have to place a "." after GetComponent. Here are the two ways you can write this:
GetComponent.().AddRelativeTorque(Vector3.back * rotation);
or
GetComponent(Rigidbody).AddRelativeTorque(Vector3.back * rotation);
↧