I’m trying to make morphs right now. The morphs that I have fall apart whenever you run the game. I think this is because they have no had joints/motor6d’s added to them. As a temporary fix, I used weldconstraints instead, looping through all of the player’s models/baseparts. The result is that there is no animation and the player moves very slowly. Is there any way to replace the weldconstraints with motor6d’s. I’ve already checked the Devhub, and it doesn’t show any adequate examples of doing so.
P.S. The person who made the rigs that I’m using did not add a HumanoidRootPart or Humanoid either, so I added them all manually in a different script(and the one shown as well)
My code:
local humanoid = Instance.new("Humanoid")
humanoid.Parent = script.Parent
for _, limb in script.Parent:GetChildren() do
for _, part in limb:GetChildren() do
if part:IsA("BasePart") then
part.CanCollide = true
local weld = Instance.new("WeldConstraint", script.Parent.UpperTorso.Middle)
weld.Part0 = part
weld.Part1 = script.Parent.UpperTorso.Middle
end
end
end
If you add the WeldConstraints to the rig, indeed you are turning it into “rigid”, theres no way that animations can be player, cause character’s parts are like “anchored”
Kinda complicated to add the motors in the rig by script, I prefer to do that manually by using RigEdit Lite pluging, which lets you offset the joint exactly where you want it.
I suggest use that plugin and add all the required motors.
Thanks for the plugin and I’ll look into it. Although complicating, doing the motors by rig in a script could be a good learning opportunity for me. Would it possible for you to show me how to do that?
That would take some time…
Iterate all parts, create a motor instance per part (take in count you only need 15 for R15) all should be named according to the default R15. plus all parts in character should be named as the default ones. And all motors should be placed inside the part that should belong according to the default R15. If you are working with R6 then names, parents etc will be different…
Then on each iteration create a motor, connect C0 and C1 to respective parts following a preMade table that follows the proper layout out of R15 or R6, disable the motor after creation so you can offset its C0 and C1, check the part boundaries, and offset each one to the very end of the part depending on the desired joint, after that re-enable motor.
By using the reference table, you know where to place them, how to name them, and by checking the boundary box of the body part you are working with on each iteration you can offset them to place them in a “approximate” desired position…
Honestly, I love to make stuff “automatically”, I always go into that way, and its perfectly possible for placing motors into a character, but you will need a good understanding of the R15 and R6 layout along with the pros and cons when handling motors (which cant be explained just in a textReply… needs experience)… Plus, you will never get a perfect position of all motors if you dont take your time to craft a character manually.
Everything can be solved by just “pushing a button”, but we should not just ignore manually crafting a piece of art, “automatic” its not always the best approach if you want to get the best results that cant be achieved by “automatic stuff”