How can i recalculate properly the hip height when i add parts into the character ? (video exemple)

Hello, I’m looking for a way to recalculate the hip height when a player takes one of my items (the item is part of the character). As you can see on the video with my character the character hip height is well adapted, but when players use bigger avatars, or smaller ones, then they can like float or be in the ground. Thanks in advance for your help

Store it in an attribute.
Ex:

local originalHipHeight = humanoid:GetAttribute("origHipHeight")
if not originalHipHeight then humanoid:SetAttribute("origHipHeight", humanoid.HipHeight) end

--later in the script, where you set the hip height back to normal:
humanoid.HipHeight = originalHipHeight or humanoid:GetAttribute("origHipHeight") or 2

Of course, you can use the BodyType and BodyHeight and BodyProportion scale values in the humanoid as well.

Hello, thank you for your answer, I tried with your formula unfortunately I can’t get it to work. I’m not a very good scripter so I don’t really understand how to do it. I understand the idea of storing the value of the hipheight to reuse it after when the player removes the item, but I do not understand how to adjust the new hip height when the player takes the bicycle.

You do the same as you did before. Humanoid.HipHeight = . I provided the code to set the hip height back to normal.

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