Custom character model issues, Please help!

Hello! I’m stuck on kind of everything to do with working on a custom character model.

So the first problem is the HumanoidRootPart, the HumanoidRootPart doesnt move when I try to move it and since the RootPart is stuck in one place(at its feet), so when I zoom in it would zoom in to the characters feet. Here is an image.
Screenshot 2023-06-26 164440

The second problem is when I insert a run animation from a script then test it my run animation would not play, maybe this has to do with the first problem? Please help!!!
Screenshot 2023-06-26 164653

Here is a vid as well.
https://i.gyazo.com/65fdabc5473451838cd9844237bc6935.mp4

Here is am image, not sure if this helps.
Screenshot 2023-06-26 170303

I couldn’t find any sources on the internet that are helpful.
I’m new to this and kind of struggling, I would really appreciate if someone can help me out.

3 Likes

Here’s a pretty good video explaining in depth how to make your own character. Hope this helps

3 Likes

Yeah that didnt really help, I think the problem might have to do with importing it or idk. aughhhhh(meme sound)

1 Like

We’d really have to see the fully-expanded structure of your character, and a sample of your animation’s keyframe hierarchy to know what’s going on here. Does the animation play correctly in the animation clip editor?

Also, CharacterAppearanceLoaded is finnicky. Depending on the character, it might not sure on the client at all. Try CharacterAdded, and in a live game environment, I recommend also checking at the time you bind CharacterAdded whether Player.Character already exists–if it does, CharacterAdded won’t fire until the next respawn of your character. This normally won’t be a problem if your PlayerAdded is binding immediately, but if you end up adding any yielding call in the loading sequence, you can easily make it so that CharacterAdded gets bound too late and end up with a difficult to identify race condition bug.

2 Likes

It works perfectly in the animation clip editor, the problem is that the character just floats around and when I zoom using the scroll(or any type of zoom), it would zoom into its feet, Ill show you in a sec here.

https://gyazo.com/65fdabc5473451838cd9844237bc6935

Here I’m zooming and it zooms into my head not my feet, This is the normal zoom.

https://gyazo.com/54c8e6fb208f7635ead7786de8196f77

1 Like

The avatar importer usually makes a HumanoidRootPart at the base of the character if you import as R15 but the structure isn’t actually R15. This is a relatively minor issue. I normally just move it up to the upper torso area and rebind it. This probably isn’t the cause of your animation problems. If the character animates in the editor OK, it means your motors setup and bone setup is valid for a skinned mesh character. So I suspect your code just isn’t running.

If you want to use a custom character like this as a player avatar, with unmodified Roblox PlayerScripts, you often need to hack things a bit to get the scripts to think your character is an R15. Like if you don’t have a “Head” MeshPart, you might need to make a dummy one, things like that.

You generally also need to uncheck Humanoid.AutoScalingEnabled and set HipHeight manually. The auto scaling only works with actual R15 parts.

1 Like

Also it wouldn’t let me move the HumanoidRootPart and I have no idea why. I’ve tried using the PiviotOffset but it doesn’t help, it just makes it worse. Let me show you a quick vid, I’ll be using a diff model for this.

EDIT: I’ll be using the original model one cause using the normal block mesh works.

1 Like

Well, everything is welded to the HumanoidRootPart with Motor6Ds, so everything will move with it. You generally have to just delete all the motors and re-generate them after you move the root part (basically, you write a weld script and run it from the command bar, like you would for a model, just using Motor6D instead of Welds). You’ll need to adjust any Bone instances that are directly children of the root part too, to take the change in position into account.

1 Like

So here is the animation.

https://gyazo.com/9a9ed85485d464bc1fe64e53a92b0b19

Here are the parts of the character, I feel like this would give you a better explanation.

Its not like the normal R16 character, it doesnt have all the separate body parts, it consists of two and I have no idea how it still animates but its pretty interesting, If I can get this character to work then I’ll be able to do so much with this.

Some more screenshots.

Humanoid Properties.

HumanoidRootPart Properties.

You still need to uncheck Humanoid.AutomaticScalingEnabled, but other than that, this should animate*. So I still think it’s a script issue. I would recommend 2 things:

  1. Get rid of the CharacterAppearanceLoaded listener. As I mentioned before, this probably isn’t firing since you’re not loading an avatar appearance at all.

  2. Don’t try to change the RunAnim instance under the Animate script in your character at runtime, make your own Animate script copy in StarterCharacterScripts that has only animations that are actually made for this character. This is not an R15 compatible character, it’s not going to work with Roblox’s default Animate script. Comment out anything you don’t have support for. Also, make sure you don’t use the same Id twice. I mean like don’t set the Walk and Run animationId to the same thing thinking it’s a good placeholder strategy, Roblox replication has no support for this and you’ll get undefined behavior that will make things worse. Just publish an Idle (even just t-pose) and your run, and start with just that.

*Once you get your character animating, you may find that it doesn’t look quite right, like the motion of the hips is gone and your character looks like they’re anchored at the hip joint. This is a particular issue you can get if you use a Humanoid instead of an AnimationController as the parent of the Animator inside a non-R15/R6 character. If you get this far, and have this problem, I can explain the workarounds.

Also, the HumanoidRootPart on the ground isn’t a huge deal, as long as it’s non-collidable. I prefer to move it up, but you can also just explicitly set CurrentCamera.CameraSubject to part attached where you want the camera to point, or use an offset from the HRP.

1 Like

Okay, this is what I’m doing for my Animate Script, I’m just testing the walk animation here.
Screenshot 2023-06-27 192000

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

--[[
local idleAnimation = script:WaitForChild("Idle1")
local idleAnimationTrack = humanoid.Animator:LoadAnimation(idleAnimation)

local fastRunAnimation = script:WaitForChild("FastRun1")
local fastRunAnimationTrack = humanoid.Animator:loadAnimation(fastRunAnimation)
]]

local walkAnimation = script:WaitForChild("Walk")
local walkAnimationTrack = humanoid.Animator:loadAnimation(walkAnimation)


humanoid.Running:Connect(function(speed)
	if speed > 0 then
		if not walkAnimationTrack.IsPlaying then
			walkAnimationTrack:Play()
		end
	else
		if walkAnimationTrack.IsPlaying then
			walkAnimationTrack:Stop()
		end
	end
end)

EDIT: umm It didn’t work.

EDIT: WAIT WAIT WAIT!!! I removed the Animation Controller and then all of a sudden it works!!! OMG OMG. FINALLYYYYYYY! (its a bit janky though lol)

Screenshot 2023-06-27 192411

Here is what I got!!!
https://gyazo.com/1a4f0cad6480d0f1b92af5251a56eac3

Dang, it took me THREE FULL DAYS to get this far. Wow… I’m glad I didn’t give up.

1 Like

Doh. Yeah, you can only have one Animator instance per model. If you import a character as Custom, it will always make that AnimationController that you’ll have to delete if you intend to use a Humanoid.Glad you got it working!

The main reason the walk doesn’t look right is because you downloaded the animation from Mixamo with the root motion included. For Roblox, you generally want to check off the “In place” checkbox on Mixamo walk cycles, so that this gets removed and the character walks in place. The character control scripts and physics engine take care of actually moving the character forward when you walk.You could probably just fix it in the editor or with a quick script if you just take the animation and zero out the translation Z value of all of the mixamorig:Hips Keyframe Poses, or more accurately subtract 1 frame’s worth of the average. Re-downloading might be quickest though.

2 Likes

I might aswell use the upload a new animation with the “in place” setting.

Alright, time for the second stage. Adjusting the animations.

Here is my code, I’m currently trying to figure out how to put all the animation together.

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid") --Getting the Humanoid
local AnimId = 0 -- Animation ID


local IdleAnimation = script:WaitForChild("Idle")
local IdleAnimationTrack = humanoid.Animator:LoadAnimation(IdleAnimation)

local RunAnimation = script:WaitForChild("Run")
local RunAnimationTrack = humanoid.Animator:loadAnimation(RunAnimation)


local walkAnimation = script:WaitForChild("Walk")
local walkAnimationTrack = humanoid.Animator:loadAnimation(walkAnimation)


humanoid.Running:Connect(function(speed)
	if speed > 0 then
		if not walkAnimationTrack.IsPlaying then
			walkAnimationTrack:Play()
		end
	else
		if walkAnimationTrack.IsPlaying then
			walkAnimationTrack:Stop()
		end
	end
end)

Increase the hip height, that’s the problem

1 Like

About year ago i tried to adjust mixamo models to work in roblox as custom character. It works Super realistic game - Roblox this link allows copying

If you have any questions let me know

1 Like