How do I apply drag rigidbody?

I want to click on an object and move it with my mouse. I have a prefab object with a rigidbody & springjoint. I applied dragrigid body script to the prefab in the project view, i get following error:

NullReferenceException: Object reference not set to an instance of an object DragRigidbody.Update () (at Assets\Standard Assets\Scripts\DragRigidbody.js:20)

The DragRigidBody script doesn't go on the RigidBody you want to drag, it goes on a controller script such as First Person Controller. An in-depth explanation can be found here:

apply the rigidbody to the object you want to drag than select your camera and apply the drag rigidbody to the camera use mouse to drag