For my game, I have NPCs of developers in the team, and I wanted to automatically change the NPC look to match the developer’s new look should they update their avatar at any point in time.
When calling the script provided below, some accessories DO get removed while other accessories stay (this isn’t just for accessories, as Shirt and Pants have the same issue)
not entirely sure what’s going on here but…
I also tried to make my own function to clear the character’s appearance as well though it’s still running into issues where the NPCs of my character work fine, while everyone else’s NPCs have no accessories or anything applied to them.
The NPCs that are in the game are originally fetched with AlreadyPro’s plugin
local Players = game:GetService("Players") local NPCHolder = SomeModel -- Model filled with NPCs here function ClearAppearance(NPC) for _, Obj in ipairs(NPC:GetChildren()) do if Obj:IsA("Shirt") or Obj:IsA("Pants") or Obj:IsA("Accessory") then Obj:Destroy() end end end function UpdateCharacters() for _, NPC in pairs(NPCHolder:GetChildren()) do local UserSuccess, UserID = pcall(function() return Players:GetUserIdFromNameAsync(NPC.Name) end) if UserSuccess then local DescSuccess, HumanoidDesc = pcall(function() return Players:GetHumanoidDescriptionFromUserId(UserID) end) if DescSuccess then ClearAppearance(NPC) NPC.Humanoid:ApplyDescription(HumanoidDesc) end end end end UpdateCharacters() while wait(32) do UpdateCharacters() end