How would I make this so it can freely move around when I play?

How would I make a part stay connected to another part, but move freely around, kind of like a door on hinges?

Edit: I just say this, I kinda want this.

d289a4ad9938d9f799c935b37b0708e447c5ae7c

How would I make it dangling, but still in mid air?