Weapon on character not moving exactly with hand - why?

Hi, I’m using the AnimStartPack and I added a socket to my characters right hand. I put an AR-15 in his hand and aligned it just like all the tutorials said to do, all looks great. My problem is that my character moves and the gun doesn’t stay on the hands, it’s close but looks bad, it’s like the character is animated right but the gun is not moving with the character. The character’s hands move a inch or so back and forth next to the gun, the gun just kind of sits in one spot but will travel with the character. Is there a way to lock the gun to the characters animation so it’s not doing its own thing? I attached a link to a gif of what’s going on, Thanks.

UPDATE: I figured it out, on my character I had the wrong parent socket selected. It needs to be the same one you add to your characters skeleton.