I’ve run into a strange problem recently when I was attempting to make an NPC in Studio which would take the appearance of a Roblox user’s avatar on spawn. I wasn’t sure how to go about this, so I looked it up and discovered the
Humanoid:ApplyDescription() function. It sounded perfect for me, so I used the simple line of code below.
-- Server script directly inside of the NPC's Character model.
However, when I tested the script the accessories were all over the place. Every single accessory seemed to have been welded to a point slightly behind the character’s head.
[ The result of the code versus what the avatar should actually look like. ]
I was unable to find anything when I looked it up, only old inconclusive dev-forum posts. I figured bumping old threads wouldn’t yield any results, so I decided to create my own post. I know that I’m not the only person experiencing this, and I know there’s a definite solution out there because I’ve seen the exact result I’m looking for working flawlessly in popular experiences before.
Any help would be appreciated, thank you!
I am aware of the countless plugins and other tools that can help load avatars for you, however I am trying to learn how to use this feature properly to be able to load certain things such as the avatar of a characters’ friend in the future. I know this would require some sort of API rather than using game.Players, but for now I want to solve the hat issue first. Thank you for understanding.