All you need to do in order to add layered clothing to NPCs is this:
local NPC = workspace:WaitForChild("NPC")
local jacketID = 0
local humanoidDescription = NPC:WaitForChild("Humanoid"):GetAppliedDescription()
local previousAccessories = humanoidDescription:GetAccessories(false)
humanoidDescription:SetAccessories({{
AccessoryType = Enum.AccessoryType.Jacket,
AssetId = jacketID,
Order = 10
},unpack(previousAccessories)},false)
NPC.Humanoid:ApplyDescription(humanoidDescription)
Note that this will reset the NPC to the default HumanoidDescription settings if you don’t already have a working HumanoidDescription for the humanoid. Also, if it already has layered clothing on it will stack them.
Joining in the conversation because I know things have probably been said about this but they really need to be emphasized. And I’m speaking as a player first and foremost.
I love this update but the deformations done on non RTHRO characters are a bit extreme.
These are two completely different items at this point. For some reason, the coat bulges out in random places and the cuffs on my non-rthro character are so unnecessarily exaggerated. And this isn’t just for the coat. There isn’t an article of clothing that isn’t ridiculously thick (and I don’t mean that in an appealing way.) It’s misleading and it makes the entire layered clothing feature feel like a push to force players into the rthro body type. Players do not like ‘pick your poison’ features. I was trying to look like Neo, but I look like I’m in Hogwarts. And there’s probably not gonna be a trench coat in the catalog that won’t make me look like I’m in Hogwarts. And we’re not even getting into the fact that the free t-shirt makes me look like a football player.
Speaking of rthro, as far as I know, there aren’t any basic rthro packages players can buy to actually wear these clothes as advertised, which is even stranger than the weird cuffs, because you would think for a feature that obviously prioritizes the rthro body type, Roblox would have a selection of rthro avatars that don’t already have an outfit gorilla glued onto them to wear. I can’t even wear the trench coat how I want to because there’s no basic rthro avatar that I can pick.
There are a couple of ways you can tackle this problem:
changing the deformation setup for non-rthro avatars to bring the clothes closer to its original look and make it look more consistent on everybody
making new rthro AND non-rthro characters (with customizable skin tones and no built-in clothing) that players can use if they want to adopt 3D clothing
adding one or more flexibility sliders to either the body scaling setup or the clothes themselves so players can at least determine how the clothes will fit on them.
I understand that proportions are going to make clothes look different, and I also understand that cartoony body types are naturally going to make clothes look cartoony by nature. However, that does not mean you can’t make the clothes deform consistently. I don’t think it’s impossible to make this all work, but if you don’t, UGC creators are going to do what they have already been doing for accessories and make duplicate clothes for different body types just so the clothes can look right on different avatars. Roblox already did not have any infrastructure for grouping duplicate or alternate colored items, and as a result, all the duplicates are going to hang out on the catalog, ultimately making the 3D catalog clunkier and closer to the mess that still is the 2D clothing catalog.
Can the avatar catalog API documentation be updated, specifically the assetType Id’s? With the release of layered clothing we now have more asset types, and while I was able to figure out the types using the process of elimination, it would be helpful for the official documentation to be up-to-date. Subcategories also need to be updated.
The T-Shirt ends up on top of the Jacket(covering it up) even if I set the AccessoryType to each Accessories, I was wondering if there is any function to make sure to equip depending on what type of Item it is with out having to worry about the order I call the AddAccessory() function.
if info.LayeredClothing then
for _,Clothing in pairs(info.LayeredClothing) do
table.insert(newmannequin.buyables, Clothing.AssetId)
end
HumanoidDescription:SetAccessories(info.LayeredClothing, false)
end
newmannequin.HumanoidDescription = HumanoidDescription
rig.Humanoid:ApplyDescription(HumanoidDescription)
Any ideas? Also, when I try anything but this one Jacket, it just doesn’t load…