Missing Assembly reference for AddForce, how do I fix it?

I’m working on a tutorial to learn C#, but he uses rigidbody.Addforce and it doesn’t work for me

Any help would be appreciated!

‘rigidbody’ is deprecated now.

Cache your rigidbody component and then use that.

private Rigidbody mRig;

void Start()
{
    mRig = GetComponent<Rigidbody>();
}

void FixedUpdate()
{
     mRig.AddForce(...);
}