How can I change the height of a humanoid?

Hello, I’ve been wanting to know how to, if possible, change the height specifically of a humanoid via script. I specifically want to use it for making an almost squash and stretch affect while playing, like stretching out while falling and squishing down when landing.

This is the model I want to change:

And these are the parts within the model:

The humanoid is R15. I’ve tried searching for it in the forums and documents but I haven’t been able to find anything that will help me. Any help would be greatly appreciated!

3 Likes

Do you mean the BodyTypeScale property of HumanoidDescription?

1 Like

I have been trying to figure that out just now, but whenever I apply the description to the humanoid, it breaks the rig for some reason, causing it to constantly fall clip slightly into the floor.

1 Like

I just read a post that saying HumanoidDescriptions need to be applied, they wont update until the method Humanoid:ApplyDescription(HumanoidDescription)

local Hum = game.Workspace.Dummy.Humanoid; 
Hum:ApplyDescription(Hum.HumanoidDescription)
1 Like

Yes, that’s what I was doing, but for some reason, it just suspends the creature into an endless purgatory of falling while not falling.

I’m still very new to all this so I’m not sure what’s causing it.

1 Like

The HipHeight may not be automatically adjusted if you script the Scale.
The link tells you the calculation for setting the HipHeight of a character. It may also fix the ‘constantly falling’ issue. I think there’s a raycast in humanoids or something similar that determines how high above the ground it is. If you’re making it taller without that method being modified the player may not be registering that the player is standing on the ground.

1 Like

Yes, it was hip height, setting the hip height via code after applying the description worked, and I managed to get change height working, but…

IT TURNED INTO THIS ABOMINATION

I assume this has something to do with the way I oriented the parts, but MAN is this cursed. Any ideas on if this is salvageable?

1 Like

Wow, that’s… disturbing.
I’m not sure, I have no experience with scaling humanoids.

Is your script perhaps changing the scale of each Part individually at the same time it’s scaling the height of the humanoid?

1 Like

No, I’m just scaling it based off the height scale.

This is what turned the character into a nightmare creature.

I wonder if it’s because you’ve flipped the Axes of the MeshParts in the model and the Height scale only works on a player’s parts on the Y axis.

The reason I suspect that is that in your picture the arms seem thicker, not longer, and the head seems skinnier, While individual parts of the legs seem to be stretched in a single direction but not the correct direction.

I think you’re right. I think I’ll fiddle around with and test offsets to see what exactly I can do to get it to look right… hopefully. The way the face concerns me that it might not ever look right. Thank you so much for the help, though!

You may have to change the Axes of the MeshParts. I’m not sure if this can be done by editing the Pivot of each item.

Yeah, I checked and the pivot doesn’t affect scaling. The problem is that my model doesn’t use mesh parts.

Ah, ok, but the Pivot of each of the Parts might be rotated then.

It seems like moon animator allows for squash and stretch within its software, so I think I’ll end up using that to help me with this, even if it does cost 30$.