Make accessories position properly with :ApplyHumanoidDescription on a smaller character?

I am making a speedrun leaderboard system where the most recent player to speedrun will have a smaller version of their character shown above a board.
I can successfully change the size of the accessories, but I’m not sure how to fix the positions. Everything appears in the wrong spot. How would I go about making them position properly?

And this is the script:

game.ReplicatedStorage.SetRunInfo.OnServerEvent:Connect(function(player)
	local playerdesc = player.Character:FindFirstChild("Humanoid"):FindFirstChild("HumanoidDescription")
	if playerdesc then
		local LittleGuy = game.Workspace.LittleGuy
		LittleGuy.Humanoid:ApplyDescription(playerdesc)
		for _, v in pairs(LittleGuy:GetDescendants()) do
			if v:IsA("Accessory") then
				v.Handle:FindFirstChildOfClass("SpecialMesh").Scale = Vector3.new(0.3, 0.3, 0.3)
			end
		end
	end
end)

Any help would be much appreciated!

1 Like

doesnt humdesc alr include scaling of avatars?

I think it does, the accessories appear at their original size if I don’t scale down the mesh size with:

v.Handle:FindFirstChildOfClass("SpecialMesh").Scale = Vector3.new(0.3, 0.3, 0.3)

Though the body itself does stay at the size of the original model. The problem is, the accessories now appear at a seemingly random position relative to the body.

Try using AddAccessory instead.

1 Like

The same problem still occurs.
image

What was your method of changing the head’s size? Changing the HeadScale property under humanoid could possibly also adjust the accessories once they are put on.

I was only scaling it in the model. Upon my attempt to change the HeadScale in the HumanoidDescription, however, it still does not change how the accessories position.

1 Like

I was able to create a smaller character clone with the accessories scaled.
image

local value = .5

character.Archivable = true
local clone = character:Clone()
clone:SetPrimaryPartCFrame(CFrame.new(0, 0, 0))
clone.Parent = workspace
	
local humanoid = character:WaitForChild("Humanoid")
local description = humanoid:GetAppliedDescription()
description.HeadScale *= value
description.DepthScale *= value
description.HeightScale *= value
description.WidthScale *= value
clone.Humanoid:ApplyDescription(description)

In your case you might not have direct access to the character so this is an alternative:

local value = .5 --Shrink factor
local userId = 75589599 --UserId of player you want to create a character for

local character = game.Players:CreateHumanoidModelFromUserId(userId)
character:SetPrimaryPartCFrame(CFrame.new(0, 0, 0))
character.Parent = workspace

local humanoid = character:WaitForChild("Humanoid")

local description = humanoid:GetAppliedDescription()
description.HeadScale *= value
description.DepthScale *= value
description.HeightScale *= value
description.WidthScale *= value
character.Humanoid:ApplyDescription(description)