How to rotate arms from certain position in code animation

How do I make the arms rotate from the shoulders? They’re moving really weird right now. I’m using code to animate, and I have all my objects and stuff set up. The level is “test” and the object is “mechBody-2”, which is placed in the level. The other parts of this mech that I’m trying to animate are located in the mechs > Bifrost B object folder.

Try set width at 3, length at 6 and move the sprite to middle vertically and do the same thing with the other. Then, fix the Attachers’ position. It should work.