Making animations for separate body parts 2D pixel art

Hi! I’m currently making a 2D pixel art game. The thing is there are different types of weapons, armor, helmet, boots and I need to switch the animation in running time, thus the player can switch their gear. I have my different body parts animations for separate (Each body part which it’s separate spritesheet). I don’t know what would be the better solution. I thought of making different layers and changing them depending on the gear the player has selected.

Links to tutorials or documentation will be very useful.

Thanks, I couldn’t find any information on how to do this.

same problem