My game had very few tools that had Motor6Ds didn’t put the Part0 to nil after unequipping. Soon, there’s going to be an update with another tool that will have to be used with this one, and if I don’t fix it, it’ll just make the tools go through the land and not connect.
Now, I have it fixed, but it has a small delay when equipped. It’ll be positioned where you last equipped it, then teleport to where the Motor6D connects it to.
Code:
module.Connect = function(sp)
if sp.Parent:FindFirstChild("Right Arm") then
if sp.Parent["Right Arm"]:FindFirstChild("RightGripAttachment") and sp.Parent["Right Arm"]:FindFirstChild("RightShoulderAttachment") then
sp.Parent["Right Arm"].RightGripAttachment:Destroy()
sp.Parent["Right Arm"].RightShoulderAttachment:Destroy()
end
sp.Parent["Right Arm"].Motor6D.Part0 = sp.BodyAttach
end
end
module.Disconnect = function(char)
if char:FindFirstChild("Right Arm") then
char["Right Arm"].Motor6D.Part0 = nil
end
end
Note the module.Connect runs when the tool equips and module.Disconnect runs when the tool unequips.
It runs perfectly fine, just a delay when equipped
Note it isn’t my device I have a gamer’s computer
Also, the Motor6D is created on character added