Help to make a connection of 2 players, as in the game Chained Together, as if they are connected by a chain

Hi everyone, I need your help. I want to understand how to connect 2 players, as in the game Chaind Together, for my project