How do I connect multiple spheres using joints and make a character?

Ok so the jist of my issue is that I tried using character joint and linked each sphere. I was successfully able to link them but when I try to move them as one game object the physics kinda mess up and all the spheres start flying everywhere.

This is because the direction of the object is only going forward and backwards. I want to move one object moving backwards then forward and another one is moving forward then backwards, How can I solve this by inspector or code?