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()