`RigidBody.mass` is not a Component. `RigidBody` is. So you need to do:
var myRigidBody : RigidBody = GetComponent(Rigidbody);
However, that's totally unnecessary. All game objects have a member called `rigidbody`, so you can just do:
function Start () {
DebugLog(rigidbody.mass);
}
Note that the Component is called `RigidBody` (with an upper-case R and B) and the member is called `rigidbody`, all lower case. Finally, in your code you clearly want to access the `mass` member. You should do something with it. In the code I posted I just printed it to the screen.
↧