HumanoidDescription on NPC not matching what I am seeing?

I am using

Humanoid:ApplyDescription(HumanoidDescription)


And it’s applying the humanoid description changes, howevr the NPC isn’t getting any of the updates.

I can’t use Shirt or Pants objects, as using code to enter the ID in will not work. For example, this id 5560240163 being pasted into a ShirtObject.ShirtTemplate turns into http://www.roblox.com/asset/?id=5560240125 automatically for me, however, if I have code to this, it’ll just set the ShirtTemplate to be 5560240163 and won’t automatically update

Can you provide the code that you are having trouble with?

  1. ApplyDescription can’t be called in the client.
1 Like

I’m doing it via the server (I’d get an error if I did it from the client)

The description is 110% being applied, just the shirt/pants aren’t wanting to be created

local function SetupDummy(dummy, data)
	local Humanoid = dummy:FindFirstChildWhichIsA("Humanoid")
	if not Humanoid then return end
	
	local HumanoidDescription = Humanoid.HumanoidDescription
	
	for _, v in pairs(data:GetChildren()) do
		if v:IsA("Folder") then
			-- Hairs / Accessories
		elseif v:IsA("StringValue") then
			if v.Name == "BodyColor" then
				local Color = BrickColor.new(v.Value).Color
				if Color then
					HumanoidDescription.HeadColor = Color
					HumanoidDescription.LeftArmColor = Color
					HumanoidDescription.LeftLegColor = Color
					HumanoidDescription.RightArmColor = Color
					HumanoidDescription.RightLegColor = Color
					HumanoidDescription.TorsoColor = Color
				end
			elseif v.Name == "Face" then
				
			elseif v.Name == "Shirt" then
				HumanoidDescription.Shirt = v.Value
			elseif v.Name == "Pants" then
				HumanoidDescription.Pants = v.Value
			end
		else
			-- Other
		end
	end
	print("APPLYING") -- prints
	-- Apply description
	Humanoid:ApplyDescription(HumanoidDescription)
end

You need to get the actual shirt ImageId, to script properties of any object using an ID from the website.

You also need either rbxassetid:// or http://www.roblox.com/asset/?id=.

That’s not how HumanoidDescriptions work. They only require the ID of the shirt (from the website)

Here’s the ID for the shirt
5560240163
https://www.roblox.com/catalog/5560240163/Ninjo-Hoodie-Remastered

If you paste that into a players HumanoidDescription and go ApplyDescription then it will load that shirt onto the player. I know how HumanoidDescription works. My problem is why is this not working on NPC HumanoidDescriptions.

The Shirt and Pants property of HumanoidDescription take the ID from the URL on the site. Same goes for faces/accessories/everything else. NOT the ShirtTemplate ID

I found a solution. Not sure how this works, but here’s how I fixed it:

On line 5 of your code, you are using the HumanoidDescription already on the humanoid. I changed that line to use a new HumanoidDescription constructed with Instance.new(“HumanoidDescription”), which made the shirt appear on the character.

Not sure if this is what you want, but it works fine constructing it from scratch and not using an existing HumanoidDescription.

Here’s a place file where I tested it on:
humanoidDescription-Test.rbxl (34.5 KB)