NPC legs inside ground once new humanoid description applied

Heres a video showing the issue:

Does anyone know how I could lift the npc up to the ground level? Some players may have small or big characters too and I want to always keep them ground level.

Heres my current code:

local animation = script:WaitForChild('AnimationID')
local humanoid = script.Parent:WaitForChild('Humanoid')
local dance = humanoid:LoadAnimation(animation)
dance:Play()
dance.Looped = true

task.wait(2)

while true do
	script.Parent:WaitForChild("Humanoid"):ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(script.Parent:GetAttribute("UserId")))
	local newTitle = script.Title:Clone() -- Adds name tag on top of npc head
	newTitle:WaitForChild("F"):WaitForChild("T").Text = script.Parent:GetAttribute("Username")
	newTitle.Parent = script.Parent:WaitForChild("Head")
	task.wait(60)
end

Maybe try checking the humanoid hip height?

Tried changing it and it didnt do anything

What about just using raycasts? This might be a complicated way but you could just fire a ray cast from the head down to the floor the sent the models position to be the rays position + the total height/2

1 Like

Nevermind, thanks for reminding me about the hip height. I found a work around using it as I noticed different character sizes have different hip heights so I just moved the character up depending on their hip height

1 Like