Help, Object Pick up script not working 100%

If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: Using code tags properly

It the problem related to you manipulating the detectCollisions property only on mouse down?