Creating a movement script to move up and down a chain (or rope) in a 2D game

I have created a chain using Hinge Joints, now I want my 2D character to grab this chain and go up and down. I want my player to be attached to this chain so that if the chain moves, the player also moves on the chain realistically. (I think I should use a kind of joint on my player too, but I’m confused)
What is the best approach to do this?

Just attach your player to the chain (make the chain its parent) and then use localPosition of the player transform to move up and down on the chain.

If there’s an issue because each piece of the chain is a separate object you can set the parent to the next link up or down when the player’s collider or the transform is near it