Parts with a Motor6D disappear after a few seconds of testing

Hello, I’m trying to make some animated parts on a gun. The parts that I am trying to animate need to be joined to the gun using motor6D’s. The problem occurs when I equip the tool upon testing. The parts are all held together just fine, but within a few seconds the parts just disappear and get destroyed.

This is the tool script.

local tool = script.Parent
local handle = tool:WaitForChild("Handle")
--
local arms = {}
--
local function setupArms()
	for _, arm in pairs(handle:WaitForChild("Arms"):GetChildren()) do
		local newMotor6D = Instance.new("Motor6D")
		newMotor6D.Part0 = handle
		newMotor6D.Part1 = arm
		--
		newMotor6D.C0 = handle.CFrame:ToObjectSpace(arm.CFrame)
		newMotor6D.C1 = CFrame.new()
		newMotor6D.Parent = tool
		--
		arms[arm.Name] = {Inst = arm, Motor = newMotor6D}
	end
end
--
setupArms()

Maybe if the script is local (and also if their network owner is the server) the parts just fall into the void on the server? That’s something I could see happening, not too sure in it though.

This doesn’t seem to be the case, still haven’t figured it out yet.