Drag restraint

ok, so im using the standard package script in Standard Assets/Scripts called DragRigidbody, to move my rigidbody objects around. The problem I am encountering and want to fix, is that I can pick this item up from extremely far away, I want to set a radius of 5 around the object. The player can only pick this object up if the player is inside this radius of 5. Can anyone help?

When they try to pick it up, you could use Vector3.Distance to make sure they are in range.

How can I go about scripting that?

distance = Vector3.distance(vector1, vector2)