Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Do I have to put in a userId for :GetCharacterAppearanceAsync()?

Hi!

If I use game.Player:GetCharacterAppearanceAsync() and leave the userId blank will it return the player's character or will I have to input the player's userId?

1 comment

0

The service name is Players. Read the api the userid is not optional

1 answer

The userid cannot be blank, without it there would be no input data to get the appearance from. You might want to read this for more information on how to use Players:GetCharacterAppearanceAsync().

If you want a username instead of an ID, you can use Players:GetUserIdFromNameAsync which you can read about here.

When I tried to do Players:GetCharacterAppearanceAsync() there were a few obstacles. Some avatars didn't generate body parts, and didn't have a humanoid. You may want to think about using Humanoid:BuildRigFromAttachments() to assemble it together. I just chose to parent the shirt, pants and body colors to a blank r15 rig with a simple loop and a class checker.

*Note: Make sure to immediately set the parent of the model that Players:GetCharacterAppearanceAsync() creates to workspace if you want it to be visible. It is not set to workspace by default. *

I hope any of this information helps you!

-proqrammedgreen

This discussion is preserved as it was. New answers, comments, and votes are closed.