How do i fix armature deformation (robot rigging)
For objects like that (machine, non-organic), don't use With Automatic Weight when you parent, because it will create weight gradients along the mesh and this is not what you want, instead use With Empty Groups, it will create as many vertex groups as you have bones but for the moment it won't assign any vertex to those groups. Then, in the Properties panel > Object Data > Vertex Groups, assign each part of your mesh to the group it is supposed to be part of.