im trying to make my custom rig be able to run on roblox’s default animations
the issue is that my motor6d that i rigged is not rotated and this results in this
and because roblox animated their rig in a rotated motor6d position without effecting the parts
i have to make custom walk animations for my rig which i suck at
but at the same time i cant wrap my head around how you could do it and i tried and i tried for hours and i couldnt get it down
the part just keeps tping to same spot and i couldnt find a post that i could use to solve my problem
I was going to suggest rotating the attachment objects, but then I realized motor6d does not use attachments. However! Upon checking its documentation, it appears you can set 2 CFrames to connect to! CFrames can store orientation, and if you can rotate the CFrames in a way you like, I think that may solve the problem.
The C0 and C1 properties of the Motor6d is probably what you are looking for.
i know these are the properties i need to manipulate but my every attempt at doing it fails, can you find an example of roblox does it or how other people do it?
local character = [YOUR_CHARACTER_MODEL_GOES_HERE]
local orientation0 = { -- Try fiddling around with putting different angles in the math.rad() calls
X = math.rad(0),
Y = math.rad(0),
Z = math.rad(0),
}
local orientation1 = { -- Try fiddling around with putting different angles in the math.rad() calls
X = math.rad(0),
Y = math.rad(0),
Z = math.rad(0),
}
for keys,val in pairs(character:GetDescendants()) do
if val:IsA("Motor6D") then
if val.Parent.Name ~= "Head" then
local motorCF0 = val.C0
local motorCF1 = val.C1
local newMotorCF0 = CFrame.new(motorCF0.Position) * CFrame.Angles(orientation0.X, orientation0.Y, orientation0.Z))
local newMotorCF1 = CFrame.new(motorCF1.Position) * CFrame.Angles(orientation1.X, orientation1.Y, orientation1.Z))
val.C0 = newMotorCF0
val.C1 = newMotorCF1
end
end
end
Try running this in playtesting and make sure to set the “character” variable alongside playing around both the “orientation0” and “orientation1” values.
Let me know the results and I will see how else I can help.
Essentially, what its doing is it gets the position of all the Motor6d CFrames (like say the point that connects the head to the torso, the arms to the torso, etc.) and it uses an orientation (like the two orientation tables) to rotate the Motor6d CFrames without changing their position.
I hope that explains it a bit better. But yes, do feel free to mess with the orientation tables to see if you get the right rotations for the Motor6Ds.
Once you find the right orientation values for you, I recommend writing them down somewhere, then you can use the Studio Command Bar to run the code one last time to update the CFrames to the way you want.