Gun animation is not playing in correct position

When the montage is played the gun moves to a complete different location and i don’t know how to fix it
i made the gun its own blueprint which i attached to the player character as a child actor component . i’m pretty sure the problem is the gun blueprint having its own local space that its using and its not using the player characters local space
i am very confused with finding a solution for this problem. thanks for the help.