Mesh to Rig Not Working Correctly
Automatic weights doesn't always work well. The more complex the mesh, the higher the probability of issues with automatic weights.
Also, if your mesh's normals are not right it can make the automatic weighting a little wonky, so you can try recalculating normals before parenting to the armature (select the mesh, go into edit mode, hit 'A' to select all faces and then 'alt + n' and 'recalculate outside'. Hope it helps.