Hi, i have currently scripted my character customisation to simultaneously change pants, shirt, skin colour and hair at the same time, so far i have gotten to change all but pants and shirt and was wondering why this script wouldn't work. Any help is appreciated thanks.
local NPC = workspace.NPCtoPLAYER NPC:FindFirstChild("Shirt").ShirtTemplate = "rbxassetid://676428254" -- works on character not on npc
thanks
You should look into HumanoidDescription, it allows you to change all aspects of any humanoid in one go.
For example what you can do is first get the existing description using:
local description = NPC.Humanoid:GetAppliedDescription()
Then you can alter the description by setting another Shirt and Pants:
description.Shirt = -- shirt id description.Pants = -- pants id
And lastly you need to re-apply the description:
NPC.Humanoid:ApplyDescription(description)
For more info you can look at the wiki page of the HumanoidDescription system:
https://developer.roblox.com/en-us/articles/humanoiddescription-system