Locking a Humanoid hitbox's UpVector

Hello, I am made an enemy that constantly looks at you, and as a result, the hitbox of Humanoid is rotating with it, causing it to do this weird jumping fling whenever I jump. Below is a video of it happening, and the transparent yellow block is to visualize the Humanoid’s hitbox.


Is there anyway to lock a Humanoid’s hitbox’s UpVector to always be something like (0, 1, 0)?

You could use an AlignOrientation instance applied to an Attachment, and with the correct settings, forcing the hitbox to stay always “up”.

How would you go about doing that? What settings am I supposed to use?

I’m going to give you instructions of how I would do it:

  • place an Attachment on your hitbox with Orientation = {0, 0, 90};
  • place an AlighOrientation with Mode = OneAttachment and Attachment0 = [Created Attachment];
  • set AlignType = PrimaryAxisParallel, RigidityEnabled = true and Orientation = {0, 0, 90}.

I recommend testing diferent values or alternative methods until you achive your desired result.

1 Like

I ended up having to also change how the enemy locks on to a player and using AlignPosition instead of a WeldConstraint to align the body with the HumanoidRootPart to fix it, but your help was very useful for making sure the actual HumanoidRootPart stays upright. Thank you for the help!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.