Animating fps viewmodel arms

It doesn’t seem to be working but I’ve got a question

  1. I have the code attaching the motor6d in a function in a local script, the function is called whenever a number key is pressed. Would this be the problem?
local function Attach(ConnectDB)
	local ToolM6D = workspace.Motor6D  -- Find the motor6D created by server script
	ToolM6D.Parent = ViewModel.UpperTorso  -- Parent it to viewmodel torso
	local Tool = workspace.CurrentCamera:WaitForChild("ViewModel"):FindFirstChildWhichIsA("Model")
	if ConnectDB then 
		ToolM6D.Part0 = workspace.CurrentCamera:WaitForChild("ViewModel").UpperTorso
		ToolM6D.Part1 = Tool.BodyAttach
	end
	if not ConnectM6D then
		ToolM6D.Part1 = nil
	end
end

image
I think I physically died inside.
Basically if you’re using egomoose’s fps framework, you’d already have a motor6d attaching the weapon handle to the head of the viewmodel.
And if you tried to apply Headstackk’s method of animating, it wouldn’t work cause there’s two motor6d’s using the exact same parts.
Delete one of the motor6d’s and edit the animation so you’re using the same motor6d in your viewmodel. Don’t know which one to use, but I’ll try it tommorow.

hello, could you help me?
I wanted to add animations to the viewmodel but I realized that the arms were practically welded to two reference blocks found in the weapon model called left and right.
I tried to disconnect them but this led me to more problems since when disconnecting the reference blocks with my hands the viewmodel simply did not move, not even to aim and I realized something else and that is that the blocks are welded to the weapon, thus making the weapon the only thing that moves.
any way to make the view model follow the camera and also when pointing and being able to make animations without having the reference blocks?.