Need a script to stick rigid body to any rigid body it comes into contact with.

Essentially I’m using a kit that has some decent mechanics for weapons and grenades. The physics are wonderful and everything works great, I would just like to be able to create another grenade, but this one will only differ from the original in the sense it will stick to other rigid body objects or other objects with rigid bodies that also have a certain script attached. I understand learning this myself would be best, but I’m just toying around with some things and would really appreciate it if someone could write this or 2 scripts for me as simply as possible. Either one that sticks the object to any rigid body it collides with, or one as I said, that sticks to other objects that also have a certain script attached to them. Thank you in advance!

Perhaps make the grenade child of the object it touches?

for example

public class StickyGrenade : MonoBehaviour
{
    private void OnCollisionEnter(Collision collision)
    {
        this.transform.parent = collision.gameObject.transform;
    }
}

Try it and tell me if it works.