I wanted the weapon to be pointing in the direction of wherever the mouse is,[![This is my player texture][1]][1]
what i want is, if a weapon is in players hand, than the weapon along with the hand, being in perfect sync with the body points in the direction where ever the mouse is
I have no idea how to implement this mechanism, please help
First off it completely depends on how the character is rigged. Are you using Spriter or something to that effect to produce a 2d skeletal animation rig? If so then the IK from that should take care of a weapon if you just attach it to the handbone. If not then simple trig is going to be your friend. Get the angle of the mouse to the center of the character or character's hand and then cos with be your X position for the weapon and sin will be your Y position.