Help with auto set Hip Height

I want to automatically set the hip height for my npc.

My current code:

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

local function recalculateHipHeight()
	local characterSize = character:GetExtentsSize()
	local newHeight = characterSize.Y/2
	humanoid.HipHeight = newHeight
end

recalculateHipHeight()
1 Like

What isn’t working with the code segment provided?

1 Like

I got it to work by resizing the humanoid root part to the model size.

1 Like

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