cannot access rigidbody of gameobject

In the scene I have GUI and Mesh. A component of the GUI is a c# script. Update in the script is reading the jump key. This is providing the value of a force to apply to the mesh. The mesh has a rigidbody component. I cannot access the rigibody of the gameobject (mesh) in the c# script to apply the force to. There must be a way! Maybe I need to make a prefab?

For now, I used variables in playerprefs to pass the data between scripts (after including a “hit” c# script component with the mesh). This works, but it is far “cleaner” and better to pass the force directly to the rigidbody in one script - I just have not got it right. :frowning:

I shared the project in dropbox … hoping a kind expert soul has 20 minutes to take a look and point me in the right direction …

https://www.dropbox.com/s/7yqc8agd5eqduig/golf1.zip

Use

gameObject.GetComponent<Rigidbody>();