Making a Custom Rig

Howdy developers,

Today I come to you seeking assistance. I’m currently trying to craft a horse rig. Altogether, it’ll have all the same parts as an R15 humanoid, just with hip/shoulder parts, a neck, and a tail. All of those will be independently moving just like LeftLowerArm for example.

My problem comes in because I need to create a rig from scratch for this. I have no idea what Motor6D does when it comes into play. I’m trying to create a Motor6D between the HumanoidRootPart and the LowerTorso, however when I run the code below, the LowerTorso just re-positions itself to have the same CFrame as the HumanoidRootPart. Do you know what I’m doing wrong? I appreciate any and all responses!

local p1 = game.Workspace.Horse.Horse_LowerTorso 
local p2 = game.Workspace.Horse.Horse_Root 
local m = Instance.new("Motor6D") 
m.Name = "Joint" 
m.Part0 = p2 
m.Part1 = p1 
m.C0 = m.Part0.CFrame:toObjectSpace(m.Part0.CFrame) 
m.C1 = m.Part0.CFrame:toObjectSpace(m.Part0.CFrame) 
m.Parent = m.Part1

image

3 Likes

I believe it’d be much easier to use a plugin to do this for you. It’s much easier to use as there’s an interface, you just select the different limbs and it automatically creates Motor6Ds. You can then adjust the origin of each joint so when you go to animate them it rotates around the joint correctly.

I think this is the one I use: https://www.roblox.com/library/2908380847/Rig-Editor

5 Likes

I had this issue a while back when I was trying to implement a custom character in studio. Have you tried rigging it in Blender/Maya and using robloxs built in custom rig importers? That fixed the issue straight away for me after spending 2/3 days of fighting roblox in studio.

Thanks a lot for the link! This seems to be exactly what I’m after. The only issue left now is that when I try to animate the rig, the parts don’t seem to move. The parts are all unanchored and don’t have any welds in them. Any ideas?

1 Like

I’ve never really seen this before.

Not sure, but is there anything the animator plugin is logging in the output?

And if possible, could you share a screen shot of your rig hierarchy and all of the children in each limb?

1 Like

I’ll continue to mess around with it. Here’s the exact rig I’ve got. If you have a moment to take a peek, perhaps you’ll be able to identify the issue better than I can.Horse_TestRig.rbxm (70.1 KB)

EDIT: It seems like removing the AnimationController from the rig actually fixed the issue. Not sure what was going on there.

1 Like

It’s probably because the animation controller and the humanoid are fighting over the rig causing the animation not work.

A new issue I’m having is that whenever the rig spawns it essentially drops into the ground like so:
image

Moving the Root part apparently doesn’t resolve this problem. The other issue is that regardless of whether or not I’m using an AnimationController or a Humanoid, playing an animation on the horse has no effect. I am however doing this in the server script. Are animations strictly local? Do I need to fire this event to all players and make them all play the idle animation?

Also, does anyone here know how to alleviate the ‘falling horse’ problem?

Make all parts massless and that should fix it? Also playing animations on the server or client should replicate, are you sure the animation is being done correctly/played correctly?

Thanks for the reply! Making all the parts massless doesn’t seem to fix the issue, since the horse just falls to the ground anyway. A typical roblox character’s legs are CanCollide = false, but the player doesn’t fall to the ground. I need for the horse to stand on its CanCollide = false legs just like a player does. What’s different between these two humanoids?

As for animations, I’ve tried both an AnimationController and the Humanoid. But give no results. The only code I’m using is the code below in a server script:

local anim = mount.Humanoid:LoadAnimation(mount.Anims.Horse_stand)
anim:Play()

If you wanna maybe mess around with the model, there’s a file above you can download.

changing the Humanoid’s hip height should help with the issue
image

1 Like

Thanks for the reply! Unfortunately I couldn’t get any results. These 2 horses have a HipHeight of 1 (left) and 5 (right).
image

1 Like

Rename the root part to HumanoidRootPart and the head to head then it should work.

1 Like

Oh sweet! That fixed the height issue, thank you so much. The only problem left is that the rig refuses to play animations, whether I’m using the AnimationController or the Humanoid. Any ideas?

When you say “refuses to play” do you mean when editing the keyframes or during runtime?

EDIT: Not sure if this will fix anything but make sure to have the model’s primary part as the root part.

1 Like

I got it to play animations I don’t know why it wasn’t working for you but it worked for me.
HorseTest.rbxm (70.9 KB)

I tried using your exact model, it doesn’t do anything on my end however.

The animation I’m trying to make it play is a test ‘idle’ animation like so:


However the in-game result (both in play solo and test server) is this, no movement:

1 Like

Try creating the animations within the place you are using the animations.

1 Like

Ah, it seems as if I was having some issues with animation permissions. The problems have been solved! Thanks for the help :smiley:

3 Likes