How can I change weapon position and rotation depending on animation

Hey guys, I don’t really know if this question have already been answered somewhere, because it seems to be something quite simple and I believe it happens in every tps game, but I just can’t really find a solution.

So,I’m creating a TPS(Third person shooter) and I want to change the rifle position on my character’s hand to follow the current animation. Here’s what I want to do:

Here, the character is in Idle animation(Wich is fine):

And then aim animation(Looking forward):

As you can see, when I switch to aim animation the weapon won’t point forward (Because it’s following the hand socket).

I read somewhere that I could do this using animation notify. On the event I would just change the weapon socket. However, I’ve tried this and it just don’t seem to be a good solution (as I have to place lots of animation notify on each animation so the transition can play more smooth). Eventually, this solution stopped working when I started spawning the weapon on begin play and swaping it on the sockets with detach and atach nodes. For some reason the node of detaching from current socket and ataching to another socket is not working(The weapon stay on the same place).

My question is,how can I make my weapon to point forward as soon as I change animations?And this is valid for any other animation, like when he runs forward,he kind change the weapon rotation a little bit as well.

Did I just got the wrong animations?(Got it from mixamo). I’ve notice that on this animations, the character don’t actually aim forward,but kind sideways, is this a problem?