How to stick player to a rope for swing in 2d

Hello,

I want to create a 2d game that player can take rope and swing from it but I can’t do this with SetParent or something like that.

Any ideas? How can I do this?