For some reason, Motor6ds are not providing the wanted results; instead of moving with the animation the parts just don’t move. They’re named and organized in the exact same way in both the animator and the player.
What it looks like right now:
What it should look like:
local motorRight = Instance.new("Motor6D")
motorRight.Name = "Handle"
motorRight.Parent = player.Character["Right Arm"]
motorRight.Part0 = handle
motorRight.Part1 = player.Character["Right Arm"]
local motorLeft = Instance.new("Motor6D")
motorLeft.Name = "HandleL"
motorLeft.Parent = player.Character["Left Arm"]
motorLeft.Part0 = handlel
motorLeft.Part1 = player.Character["Left Arm"]
All gear parts are also unanchored and cancollide off.
This is the first time I’ve encountered something like this, any help would be appreciated.
Hmm, the issue is caused when you create a new Motor6D Instance. By default, the Motor6D C0 and C1 offsets used to position the sword where it is are equal to CFrame.new() which will lead to the model being inside in the middle center of the part of the Part0 or Part1.
For the best-intended results which match the animation you made, copy the CFrame data of the Motor6D you used within your rig and then add the C0 and C1 data of the rig’s Motor6D.
You can find the C0 and C1 CFrame offsets by printing it out via the command bar like so:
--You will 12 numbers will represent the CFrame data of the
--C0 and C1 joints
Then you can set it within your script:
motorLeft.C0 = CFrame.new(the12numbersDataYouGotFromPrintingItOut)
I dont know if this will work for you but I use motor6d with animations in my game and I just insert and actual motor6d into the animating character(not through script) and just assign it there.
Halfway through writing this I saw the other reply so LOL.(try it first I guess)
TO ANYONE ELSE FINDING THIS THREAD; MAKE SURE YOU CHECK THE ORDER OF PART 1 & PART 0 UNLIKE I DID, I SPENT A WHILE JUST WONDERING WHY DIDN’T IT WORK.
Hmm. It works but I’m still confused about why the motor6d isn’t working like it did with all my other projects. With all my other projects, the Part0 would follow the animation as made in the animation editor.
I used M6Ds with the animation rig as well and I made sure it was m6d’d without saving the position. Rig I animated it on without animation playing:
I expected it to work like it did with tools I made, but it just didn’t.
Nonetheless, your solution worked, thank you.
[edit: made clearer]