Resetting player's character body colors back to default

Hello, I’m trying to make a script that changes the brick color of the character’s body part when enabled. I keep getting an error of GetCharacterAppearanceInfoAsync is not a valid member of Model “Workspace.stratolog”

script:

if enable then
    player.character.RightLowerLeg.BrickColor = BrickColor.new(255, 255, 255)

else
    player.character:GetCharacterAppearanceInfoAsync()

thanks!

ps: this is just a part from the script

1 Like

GetCharacterAppearanceInfoAsync is a function of the Players service, and it expects a userid as an argument

I think it’s better if you store the previous colors in a table and refernece those to revert back

I dont know much about GetCharacterAppearanceInfoAsync
Is this okay?

player.userId:GetCharacterAppearanceInfoAsync()

No, it works like this

Players:GetCharacterAppearanceInfoAsnyc(UserId)

Where Players is the Players service nad UserId is the userid to check

I hate this keyboard

try this link
has all the info you need

1 Like

btw if you want to revert colors or ANY property with any instance there is a way to do that and I have it but I’m at school rn so if you want that then tell me

1 Like

Is there a way I can store the colors? I dont use these references a lot so its quite confusing.
(a link is okay too!)

I think you can just reference the Body Colors object that’s in every character and change the color from there instead of directly changing the color. So instead what you can do is when the colors are changing, before they change, a copy of the object is made, and when the colors must be reverted, just destroy the Body Colors object and put in the copy

that’s what my message from before was talking about

1 Like

Are u talking about Humanoid:ApplyDescription?

No, there’s an object in every character called Body Colors, which is responsible for the colors of a character, you get it, clone it, change the colors of the one in the character. when it’s time to change the colros back, destroy it, and parent the clone to the character

Wouldn’t it create lag because of the character clones?

I’m not saying to clone the character, I’m saying to clone the Body Colors object inside of the character, it shouldn’t cause lag just by cloning that

I’m sorry for the inconvenience, how do u exactly clone body colors?

It’s an instance, so you just do :Clone()

1 Like

I meant how do u reference “Body Colors”.

Character["Body Colors"]

You can see it for yourself in the character model in the explorer encase I got the name wrong

Am I doing something wrong? I’m getting this error in the output. Body Colors is not a valid member of Model “Workspace.maxi2702”
the script i made:

if enable then
	player.character["Body Colors"]:Clone("body")
            player.character.UpperTorso.BrickColor = BrickColor.new(255, 255, 255)
else
	player.character["Body Colors"]:Destroy()

Well from the looks of it, it could be that it couldn’t find anything. That or because you don’t put the clone in a variable, you’re forgetting to do the last step, parenting the clone to the character after destroying the original

I’m trying to destroy the clone at the end.

this is quite confusing, Are there other options instead of cloning?