Rope Swing with Part

Hi, so i found the perfect example what i wanna make, here:

Does anyone know the basic concept of this? like i assume there is a long Cylinder inside which there is a script that handles when player touch the Cylinder then attach the player to the Cylinder using WeldConstraint and above of it there is a Sphere with BallSocketConstraint inside of it

but after i made it it was not as i expected :confused: