Does anyone know how to fix this bug in the animation editor?

I’m not sure if this is the right section to post this in, but I rigged the gun, but for some reason the parts always move from the center of the gun, and it’s really annoying. Can anyone help me wit hthis?