After exhausting Google, the DevForum, and the Roblox Studio Community Discord without finding any clear answers, and spending the entire day trying to figure this out, I finally made some progress on manipulating accessories via scripting!
A lot of the difficulty comes from the still relatively-recent changes with humanoid descriptions and how to access the player models. I’ve been fairly comfortable with doing that, but I’ll recap some of it here for anyone who is still struggling with outfitting players or NPCs:
Currently, the way you want to access a player’s character model is through the humanoid description object and the functions related to it, instead of trying to access it directly through the workspace. The newer documentation on it is pretty clear and helpful. For instance, in my current project I’m making some NPCs for the player to interact with so I used the Rig Builder plugin to insert some generic Rthro models into my game.
I have them placed where I want in the workspace, then I also have in storage some HumanoidDescription instances that have all the information needed to deck out my models. The main script of my game then applies these descriptions to the models using the :ApplyDescription function.
Now all this works beautifully for setting up my NPCs, but some of the accessories don’t scale correctly for the models they’re put in.
Changing the body scale properties can help some for maintaining proportions, but then the accessory scale or offset may still not be quite right.
You can see here how much the hat is clipping into the head. I played around with things for a while, trying to adjust the AttachmentPos of the accessory didn’t do anything, neither did changing the position of the individual attachments. I could move the accessory around by changing the position and size in the handle, but none of those changes would stick when testing.
Finally, I found out that the accessory’s handle has a SpecialMesh part with both offset and scale values. Those can be changed via scripts and the changes DO stick in the actual game.
Adjusting those ends up giving you some results that look much better!
So the TL;DR version is if you want to change scale or offset of an accessory with scripts, you need to change the values of Accessory.Handle.SpecialMesh.Scale and Accessory.Handle.SpecialMesh.Offset.
I just hope this helps out someone else struggling with the same problem!