Viewmodel rigged incorrectly (I think)

I do not know how to rig or animate so this is a first for me.

I have a rigged viewmodel that uses bones.
I have a simple gun model that I am trying to attach to the viewmodel.

It looks like this:

It is rigged like this:

This is what happens when I move the attach part:

When I go into the game, it is offsetted somehow. I’m using a very simple script that parents the gun to the viewmodel, creates a Motor6D, and then plays the animation.

Here is what it looks like:

If you look at the image of the animation editor, the right hand is on the barrel of the gun near the trigger.

I don’t think it is supposed to do that. Attached is the place file if you would like to look at it directly.
fps.rbxl (77.0 KB)