How do you make a Rigidbody freeze the object position when not dragging?

Okay, I know the question is kind of confusing and not clear. So, what I am trying to say is I want to make a a draggable item using the dragrigidbody script, but I want it to freeze the position when I’m not dragging it, so when I run into it it doesn’t move. I am new to scripting and Unity, but I am currently learning C and C++. Sorry if this question sounds kind of dumb, I am only twelve.

EDIT: I figured it out. I edited some script in the FPSCharcater Controller and changed the rigidbody push to false, I also made the player’s push power 0 and it works great!

You could access the Rigidbody component on your object and use the “Freeze Position” and “Freeze Rotation” constraints.

Constraints Script Reference