GetCharacterAppearanceAsync not working

Whenever I use GetCharacterAppearanceAsync and set the parent to Workspace theres a model of unanchored body parts that quickly deletes itself after about a second. I’ve simplified the code that I made to where the problem is coming from.

local function onPlayerAdded(player)
    local playerId = player.userId
    local playerAvatar = game.Players:GetCharacterAppearanceAsync(playerId)
    playerAvatar.Parent = game.Workspace
end
game.Players.PlayerAdded:Connect(onPlayerAdded)

Can someone please tell me how to get around this weird result?

set it to something like serverstorage or replicatedstorage, or, before you parent it, set the parts to anchored.

Deprecated
This item is deprecated. Do not use it for new work.

It means they won’t update it if there are errors.
You can use GetHumanoidDescriptionFromUserId, you just have to have a saved NPC.

NPC = 
local Description =  game.Players:GetHumanoidDescriptionFromUserId(UserId)
NPC.Humanoid:ApplyDescription(Description)
1 Like

I made a thread earlier today asking about how to get a player’s avatar data and instance it into the workspace and nearly all of the replies were saying to use GetCharacterAppearanceAsync. :thinking:

There are outdated things that still work (like Humanoid:LoadAnimation()), but others not so much as in this case, the ones that still work may stop working and that’s why its use is not recommended I guess.

And I also think they changed this function because some people wanted to change the resulting avatar and it was a big hassle to do so.