Humanoid:ApplyDescription() not working as intended

Here’s my code simplified

player:ClearCharacterAppearance()

local hum_desc = game.Players:GetHumanoidDescriptionFromUserId(player.UserId)
local hum = character:FindFirstChild("Humanoid")
if hum_desc and hum then
	hum:ApplyDescription(hum_desc)
end

Output
Hum_desc_err

The goal was to reload the characters avatar, but the appearance is still cleared after the ApplyDescription() call.

I was under the assumption that GetHumanoidDescriptionFromUserId() would ignore the current humanoid description and ask Roblox for the players description outside of the game.

Thanks in advance.

6 Likes

After some testing, it does ignore the current appearance and gets the humanoidDescription from the id saved on Roblox, but I believe this is a problem with how ApplyDescription uses caching.

If you delete your hat, then apply your own description, it will see that you’re supposedly already loaded with that description, so it will assume you already look like that description and not do anything.

If you change to Roblox’s description (UserId = 0), then delete the hat, then again apply Roblox’s description, it will again assume you look like that description and not change anything.

You can bypass this by changing to another description, like Roblox’s, then back to your appearance.

local temp_hum_desc = game.Players:GetHumanoidDescriptionFromUserId(1)
local hum_desc = game.Players:GetHumanoidDescriptionFromUserId(player.UserId)
local hum = character:FindFirstChild("Humanoid")
if hum_desc and hum then
	hum:ApplyDescription(temp_hum_desc)
	hum:ApplyDescription(hum_desc)
end

it’s kinda a gross method, but it works for me

21 Likes

Thanks a bunch, this was a big help.

3 Likes

Good solution, not at all ideal however.
I will never understand why so many methods have hidden rules that you only discover after investing hours of research into trying to get a single method to work.

7 Likes
local players = game:GetService"Players"

local function onPlayerAdded(player)
	local function onCharacterAdded(character)
		if not player:HasAppearanceLoaded() then
			player.CharacterAppearanceLoaded:Wait()
		end
		
		local humanoid = character:WaitForChild"Humanoid"
		local accessoryClones = {}
		for _, accessory in ipairs(humanoid:GetAccessories()) do
			local accessoryClone = accessory:Clone()
			table.insert(accessoryClones, accessoryClone)
		end
		
		humanoid:RemoveAccessories()
		task.wait(5)
		for _, accessoryClone in ipairs(accessoryClones) do
			humanoid:AddAccessory(accessoryClone)
		end
	end
	
	player.CharacterAdded:Connect(onCharacterAdded)
end

players.PlayerAdded:Connect(onPlayerAdded)

You could just manually cache the player’s avatar’s accessories and then re-apply them at some later time (as to circumvent depending on API requests).

You would need to check if the humanoid exists first.

6 Likes

Old post,
but this isn’t working for me? Do you have any idea why?

1 Like

I’d probably just avoid using HumanoidDescriptions and instead manually load the accessories, body color, and face


you could use GetCharacterAppearanceInfoAsync to get all the info you need to load

1 Like