Make player swing on rope on interactionn

Hello, I have a rope that is made up of multiple bones(rigid bodies and colliders). The player is also a rigid body, I need help with a script to have the player press “E” when close to rope and the player(rigidbody) attaches to rope and moves with it.
Also I would like to add force so the player can move in back and forth while on the rope.