--//Controller/--

Humanoid.Died:Connect(function()
	for i, Joint in pairs(Character:GetDescendants()) do
		if Joint:IsA("Motor6D") then
			local A0 = Instance.new("Attachment")
			A0.Parent = Joint.Part0
			A0.CFrame = Joint.C0			
			
			local A1 = Instance.new("Attachment")
			A1.Parent = Joint.Part1
			A1.CFrame = Joint.C1	
			
			local BallSocketConstraint = Instance.new("BallSocketConstraint")
			BallSocketConstraint.Parent = Joint.Parent
			BallSocketConstraint.Attachment0 = A0
			BallSocketConstraint.Attachment1 = A1
			
			Joint:Destroy()
		elseif Joint.Name == "Head" and Joint:IsA("BasePart") then
			local WeldConstraint = Instance.new("WeldConstraint")
			WeldConstraint.Parent = Joint
			WeldConstraint.Part0 = Joint
			WeldConstraint.Part1 = HRP
		
		end
	end
end)
