For some reason, when a player is large, and they scale themselves back down, their torso is suspended in the air. I personally cannot get this bug to replicate, but others have had it happen to them, and recorded it happening
local valueRounded = tonumber(string.format("%0.1f", value))
local valueClamped = math.clamp(valueRounded, 1, MAX_SIZE)
humanoid.HumanoidDescription.WidthScale = valueClamped
humanoid.HumanoidDescription.DepthScale = valueClamped
humanoid.HumanoidDescription.HeightScale = valueClamped
humanoid.HumanoidDescription.HeadScale = valueClamped * .5
if humanoid:FindFirstChild("HumanoidDescription") and humanoid:IsDescendantOf(workspace) then
humanoid:ApplyDescription(humanoid.HumanoidDescription)
else
humanoid.BodyWidthScale.Value = valueClamped
humanoid.BodyDepthScale.Value = valueClamped
humanoid.BodyHeightScale.Value = valueClamped
humanoid.HeadScale.Value = valueClamped * .5
end
This only seems to occur after a player resets a few times
Because you need to scale the HipHeight property of the Humanoid instance, in accordance with how you have scaled the character.
https://developer.roblox.com/en-us/api-reference/property/Humanoid/HipHeight
Even with their formula, players are still getting floating torso’s
humanoid.HumanoidDescription.WidthScale = valueClamped
humanoid.HumanoidDescription.DepthScale = valueClamped
humanoid.HumanoidDescription.HeightScale = valueClamped
humanoid.HumanoidDescription.HeadScale = valueClamped * .5
if humanoid:FindFirstChild("HumanoidDescription") and humanoid:IsDescendantOf(workspace) then
humanoid:ApplyDescription(humanoid.HumanoidDescription)
else
humanoid.BodyWidthScale.Value = valueClamped
humanoid.BodyDepthScale.Value = valueClamped
humanoid.BodyHeightScale.Value = valueClamped
humanoid.HeadScale.Value = valueClamped * .5
end
humanoid.HipHeight = (0.5 * humanoid.Parent.HumanoidRootPart.Size.Y) + humanoid.HipHeight
No, you would calculate HipHeight by just doing:
Humanoid.HipHeight = Humanoid.HipHeight * Scale