Hip Height refusing to change

I made a gamepass for my game that allows you to change your size. At first, I was having some problems getting the rig to work correctly when scaling, but that problem got solved. Then, another problem came. The character was kinda stuck on the ground. I knew that it was because Humanoid.HipHeight was too low. I made it so it will change to the scale of the character multiplied by the hip height. What do you know, it didn’t want to change. I tried another solution but it ended up creating a memory leak. It does sometimes work, but it really begins to occur when I scale down. I looked at the hip height and it was in the negatives. I tried making it so if the scale changed then it will repeatedly change the hip height until it was correct, but that failed as well. If you’re wondering, the character is a custom character with the legs replaced with a custom one. I saw that in R15 the hip height depends on the humanoid’s size on the Y axis divided by 2. I tried using that and resizing the humanoid to a custom size but the hip height was still terribly low. is there a solution to this?

Are you changing the hipheight before or after scaling the character?

I change the hip height after scaling the character

I’ve had problems with scaling the character before, sometimes you have to wait a second for the character to fully scale before changing the hipHeight. To check if the character scaled you can save the size of the upperTorso then apply the scale then ;
you can do While character.UpperTorso.Size == savedSize and Wait() do end
then on the next line you can change the hip height to the - Position of the humanoidRootPart minus the Y size of the humanoidRootPart.

it still doesnt work for some reason

When you scale it do you do it manually or use the depth / height Values?

i made a hip height for normal scale but when i change it i change the hip height to the default height * head scale

Does hip height usually mess up with custom characters?

I’ve just spent all day trying to figure this one out without doing some of the other things I found suggested on the forum. Like manually setting HipHeight after the character loads.

The problem:
If you notice, after ticking the AutomaticScalingEnabled property on the humanoid on and off, you can see the HipHeight gets recalculated. Same as if you parent the humanoid to a different service with the option enabled. Causing HipHeight to be negative and randomly scoot about until it falls off the edge of the map. At least with my custom characters using the R15 rig type.

The solution:
Before building your custom rig with Humanoid:BuildRigFromAttachments(), make sure HumanoidRootPart is off the ground, and position each RootRigAttachment at ground level. Then build the rig.

Now you should be able to set HipHeight to any value (correct or not), toggle the AutomaticScalingEnabled option off and back on, and HipHeight will be updated to the correct value according to the placement of the attachment. I’ve also noticed that changing any of the body scales will not automatically update the rig unless it is done server-side, or by toggling the scaling option while in the studio.

1 Like