Problem with replicating real arm movement to viewmodel

Using Headstackk’s method (How do I replicate Real Arm movements to Fake Arms (ViewModel)?) to create an fps viewmodel, I had ran into problems with attaching the gun to the viewmodel on the client side.
https://gyazo.com/7df894cc9c4635a57d3288383d8e7d06
As i’m unfamiliar with creating FPS viewmodels on roblox, i’m stumped to what could be causing this?

local script

Tool.Equipped:Connect(function()
	CheckConnect = true
	ConnectM6D:FireServer(CheckConnect)
	
	ViewModelRoot.ToolM6D.Part1 = Tool.BodyAttach
	ViewModelRoot.ToolM6D.C0 = ViewModelRoot.ToolM6D.C0 * CFrame.new(0,0,0)
	
	trackIdle:Play()
end)
Tool.Unequipped:Connect(function()
	CheckConnect = false
	ConnectM6D:FireServer(CheckConnect)
	trackIdle:Stop()
end)

Make sure the arms & the ak47 parts cancollide are off.

I had whittled the problem down to conflict between the server script which attached the gun to the player torso, and the local script which attached the gun to the viewmodel. However, after deleting the server sided code, the gun will occasionally fall out of the players backpack, being unable to equip it again, not to mention the guns animation is not properly playing. https://gyazo.com/bbfc34f4731bf84dea6e66ffe436b952