Making a HumanoidRootPart not standup straight

I have a vehicle-based NPC in my game that uses a humanoid, which it contains the basic parts: HumanoidRootPart, Torso, Head. I’m trying to make it where it runs up ramps correctly. For example:

What I’m trying to accomplish is this:

But instead, it does this:

I’ve looked through the properties of the humanoids in the wiki to see if there’s a property I can trigger to prevent the HumanoidRootPart from just standing up straight, but I don’t see any so. I’m thinking about just adding real invisible wheels to it (because the wheels in the NPC are fake, not collidable, and animation based), but I’m not sure if it would work. What should I do?

2 Likes

@EgoMoose created a custom character controller that allows walking on ramps, walls, etc.

1 Like

That’s a good and very unique article, but I don’t think it’ll help in my case.

1 Like

Raycast downwards and adjust rotation based on surface normal.

1 Like

Doing that does work, but the problem is that I have to leave PlatformStand on true.

I can’t leave it on true because the humanoid has to use MoveTo, and setting it on false makes it goes into shiver mode.

So, :man_shrugging:

1 Like

Humanoids are pretty wack. I’m not sure if a humanoid would be your best bet for what you’re trying to accomplish, unless there’s an easy workaround somewhere. Seriously wish they’d give us more control over them…

5 Likes

Rotate the model separately based on the angle of elevation. This would imply that the head, torso, rootpart will be invisible and the model will be relative to the rootpart position.

Probably makes no sense, it’s fairly hard for me to explain things that only make sense to me.

Not sure if a npc can use a vehicleseat when using moveto on their humanoid, you should experiment with that. ;p

1 Like

I have a placefile on my computer that adjusts the root motor6d to have a humanoid tilt to what they are standing on. It does not allow you to walk up walls etc. Its just visual which is i believe what you want?

I am on my phone though, so if i dont post it at some point tonight plz DM bc i prob forgot.

Is this going to be a strategy game?

1 Like

Why use a Humanoid for this NPC?

1 Like

As promised here’s the placefile.

CharacterTilt.rbxl (14.6 KB)

12 Likes

Like EgoMoose posted, I would recommend that you shoot a ray downwards to get the rotation of the part that is under the ballista, and change the HumanoidRootPart’s RootJoint cframe to match the CFrame of the part below it.

1 Like

Besides this post, though this is very usefull for a project of mine, thank you!

2 Likes

Question, how should i go around getting the rotation to replicate to the server? Wouldnt using a remoteevent every 1 second cause it to look off?

1 Like

Prob best to use a body move of some kind to replicate the CFrame. There’s quite a few ways to go about it, but you have to get creative.

1 Like

You could probably update each players root joint CFrame on the client every second. You don’t need the server to do all the work, however. Unless you need it to update for positions or something, I would recommend doing it client side, since it puts less stress on the server.

2 Likes

Ahh thank you. Will try doing this.

Mostly because the MoveTo function in the humanoids are primarily favorable for me to use on NPCs (and also it helps with easier detection configuration for items in the game). It is possible to remove it and then use a body mover or just do some CFraming method if necessary, but since the game is planned to be flooded with NPCs that do complicated tasks, i think it’s more reliable to use in my opinion. Eh?

1 Like

This is exactly what I was looking for, thanks!