I’m working on a Roblox project where I generate NPCs with clothing, but I’m having issues with the clothes not appearing on the rig. Here are the details:
- Clothing Templates:
- I’m using instances of
Shirt
andPants
and setting their templates like this:
shirtInstance.ShirtTemplate = top.ShirtTemplate
pantsInstance.PantsTemplate = bottom.PantsTemplate
- The clothing items are stored in
ReplicatedStorage
underNpcFiles/NpcCharacteristics/Clothes
.
- Accessing Template IDs:
*I tried using both formats:
rbxasset:// and
http://www.roblox.com/asset/?id= - Hierarchy:
The clothing items are organized in pairs (e.g., MalePair, FemalePair), and I ensure that the Top and Bottom items exist in the selected clothing folder. - Debugging Steps:
Checked that the template IDs are correct and accessible.
Checked that the clothing items are set to the correctInstance type (
Shirtand
Pants`).
Ensured that the NPC model is properly parented to the workspace after the clothing is applied.
Issue : Despite these steps, the clothing is not visible on the NPC model. Any advice on what might be causing this or how to debug further would be greatly appreciated!
The Clothes Template Ids are added from a script , The dummy on the Right is added manually but the one on the left is from the script