Motor6D CurrentAngle does not reset when .Part1 is nil

Motor6D does not reset current angle when removing Part1 from it. Which happens when unequipping tools. The bad thing about it, is that it replicates to other tools causing wrong rotation.

A video visually showing the issue:

The code i am using to handle grips:
local handleM6DParents = {}
for _, handlePart in pairs(type(self._handle) == "table" and self._handle or {self._handle}) do
	table.insert(handleM6DParents,
		handlePart.Name == "RightArmAttach" and "Right Arm"
		or handlePart.Name == "LeftArmAttach" and "Left Arm"
		or "Torso"
	)
end
self._tool.AncestryChanged:Connect(function(_, ancestor)
	if self.destroying or not getmetatable(self) or not self._owner or not self._owner.Character then
		return
	end

	if ancestor == self._owner.Character then
		for i, handlePart in pairs(type(self._handle) == "table" and self._handle or {self._handle}) do
			handlePart.Anchored = false
			local M6D: Motor6D = ancestor[handleM6DParents[i]]["ToolGrip"]
			M6D.C0 = handlePart:GetAttribute("M6DC0") or CFrame.new(0, 0, 0)
			M6D.Part1 = handlePart
		end
	else
		for i, handlePart in pairs(type(self._handle) == "table" and self._handle or {self._handle}) do
			local M6D: Motor6D = self._owner.Character[handleM6DParents[i]]["ToolGrip"]
			M6D.Part1 = nil
			handlePart.Anchored = true
			handlePart.Position = Vector3.new(0, 0, 0)
		end
	end
end)

I tried manually handling it but it did not change anything. The only solution i can think about is giving a handle to all tools (possibly), which i can’t do. If you guys know how to fix it or if i am forgetting something, please tell.

Expected behavior

The angle should reset to 0 and should not get replicated to the “Airstrike Order” tool. But removing Part1 before equipping “Airstrike Order” tool, does not reset the angle.

1 Like

This is just an acknowledgment announcement!

We’ve filed a ticket into our internal database for this issue and will start investigating, we will update you when we have further information.

Thanks for flagging!

1 Like

Hi. How do you have a Motor6D connecting your hand to the Tool? When I equip a Tool, the connection is a Weld.

Did you create the Motor6D yourself? If so, do I understand correctly you’re saying CurrentAngle should reset to 0 whenever the Part1 is changed to nil? I’d expect the opposite, the CurrentAngle value should persist unchanged unless you explicitly change it to a different value.

1 Like

Hi, my characters contain 3 motor6d, one in right arm, others in left arm and torso, named as ToolGrip. They all have Part0 as the parent. Part1 gets automatically attached if our self has an _handle index. My tools have RequiresHandle turned off.

The problem is that there is a weird behavior, lets talk about Part1 Changes,
Handle1 turns CurrentAngle to 1.268 rad due to animation. Handle2 does not have any rotation/animation that modifies Motor6D.
Handle1 refers to rocket launcher (the one with animation)

When switching to Airstrike Radio from Rocket Launcher:
Handle1 → nil → Handle2 works as expected. CurrentAngle = 0 from 1.268 rad, which is what we want on Handle2.

When switching to Rocket Launcher from Airstrike Radio:
Handle2 → nil → Handle1 works as expected. CurrentAngle = 1.268 from 0 rad, which is what we want on Handle1.

Airstrike Radio → A tool with no handle / empty hand → Rocket Launcher:
Handle2 → nil → Handle1 works as expected. CurrentAngle becomes 1.268 from 0 (nil), 0 (Handle2), which is what we want on Handle1.

Rocket Launcher → A tool with no handle / empty hand → Airstrike Radio:
Handle1 → nil → Handle2 does not works as expected. CurrentAngle stays 1.268, (Handle2) (nil) (Handle1), which is not what we want on Handle1, it has zero rotation.

I would say this is has to do with the animations, like rocket launcher etc. modify Motor6D rotation.
But like, than why is 1. and 2. case is happening correctly?? Also I do reset the CFrames…

The problem is that it won’t work. I tried resetting both CFrame and CurrentAngle to default (0’s) when moving the tool to backpack.
CurrentAngle does not reset.


I mean trying to modify it should give errors but even that does not happen. Something is weird with this property.

1 Like

Its a weird/confusing bug and not that impactful, i know. But whatever is calculating the current angle, is causing problems. Just saying so it doesn’t get forgotten.