My mesh freaks out when I rig it, i think because it's made of separate pieces I'm having a problem with the rigging in my mesh. I made it by adding cubes in edit mode to make the different body parts.



So anyways, when i made the armature for the mesh, an error popped up. It said "Bone heat weighting: failed to find a solution for one or more bones". I can't manage to make it work.



In this next picture, i rotated his left leg back 90 degrees and his right leg 45 degrees. The left leg moves both and the right one stretches the body. The head and arms stay where they are no matter what i do, also do the hair and cap





Any tips? I've been looking for answers but none of them seem to help with my particular issue
Did you check whether the mirror modifier is applied or not and if the armature modifier comes first in the modifiers tab of the object?

If there are any modifiers active except the armature modifier I would try to apply those first.

Also, you can change to weight painting mode and assign the bones manually to certain vertices. But you might know this already.