Apply DragRigidBody.js to only a certain group of objects and only in a specific area

Hi, new here and very very limited javascript skills. I’m trying to work everything out myself or via tutorials/forums but I’m stuck since a few days here: Is there an easy way to tell the bundled DragRigidBody.js to apply to only a certain group of objects (tagged)?
My other question would be if one can limit the area to which the script applies ( I basically want to shoot an obect but not let the user control the thrown object in mid-air).
Thanks a lot in advance!

Create a new JS script file with a name like ‘MyDragRigidbody’. Copy and paste the contents of the DragRigidbody.js script into this new file. You will be using this file in place of the original DragRigidbody.js script.

Insert at line 25:

if (hit.collider.tag != "WhateverTagYouWant") 

And below that, you can do your check:

if (hit.transform.position.y > someValue) 

I’m not sure how you will define the acceptable area to start dragging. I’ve done it here by the ‘y’ value, but you may want something else. Regardless, figure out your check, and just return if the criteria is not met.