Rigid body holding another Rigid body

HELLO. The code below shows how to collide your player(Rigid Body) with another Rigid body, and doing so, a Fixed Joint is created connecting them two together and moving together. I have two questions based off this information.

  1. Fixed Joints was my solution to connect the 2 rigid bodies on contact, but is there another way that doesn’t include using Fixed Joints to connect these have one rigid body hold the other rigid body?
  2. How could I write this to use press E to perform the same action instead of on contact. Reminder that I want to access the object’s rigid body!!
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEditor.Build;
using UnityEngine;
using UnityEngine.UIElements;
using static UnityEditor.ShaderGraph.Internal.KeywordDependentCollection;

public class PlayerOnRope : MonoBehaviour
    [SerializeField] private Rigidbody rb;
    [SerializeField] private KeyCode letGo;

    bool hasJoint;

    void OnCollisionEnter(Collision collision)
        if (collision.gameObject.GetComponent<Rigidbody>() != null && !hasJoint) {
            gameObject.GetComponent<FixedJoint>().connectedBody = collision.rigidbody;
            hasJoint = true;

    public void Update()
        var Container = gameObject.GetComponent<FixedJoint>();
        if (hasJoint) {
            if (Input.GetKeyDown(letGo)) {
                hasJoint = false;

                // Pick Random Number
                Debug.Log(Random.Range(1, 100));