Object exploit when i grab it while standing on it

Hello. Please help me how to solve this problem. I have a simple object grab/drop mechanism from youtube tutorials, but i am facing some issues.

  1. when i stand on the object, and press the pickup key , it starts to fly up with the character.

  2. How to set up a specific distance, where the object could be dropped automatically.

Here is the image.Hope someone can help me.Thanks