[R15] Anyone Know How to Properly Reset HipHeight When Replacing Limbs with New Package Pieces

I figured out an answer.

So, apparently for R15, hip height is the offset from the ground to the bottom of the HumanoidRootPart. So, the calculation is actually pretty simple. Here is a function to do this:

function recalculateHipHeight(character)
	local bottomOfHumanoidRootPart = character.HumanoidRootPart.Position.Y - (1/2 * character.HumanoidRootPart.Size.Y)
	local bottomOfFoot = character.LeftFoot.Position.Y - (1/2 * character.LeftFoot.Size.Y) -- Left or right. Chose left arbitrarily
	local newHipHeight = bottomOfHumanoidRootPart - bottomOfFoot

	local humanoid = character:FindFirstChildOfClass("Humanoid")
	humanoid.HipHeight = newHipHeight
end
24 Likes