How to change skin color via script, without using the parts?

I want to be able to change the color of a character’s skin without just using a loop on all the MeshParts under the character (this is because it messes with the tool they may be holding).

I am looking into using HumanoidDescription but I am not sure whether this is universally supports the same code for both R15 and R6 (like .LeftLegColor = blah blah works for both).

If anyone could help it’d be great!

3 Likes

What do you mean it messes with the tool? If you use GetChildren, you should only get the children of the character, not its descendants, meaning the parts within a tool should not be affected.

Have you tried doing something like this ?

game:GetService('Players').LocalPlayer.Character['Body Colors'].HeadColor = BrickColor.new('Really red')

This would obviously only change it for the head , but obviously you can change different body colors accordingly

That’s not a good idea at all since LocalPlayer can be only called from the Local Script, meaning that code works but only player itselfs can see the skin change, not the others.

If the person who posted this intends it to be a server script , it would only take a bit of rewriting to do so . I do not understand what you are trying to tell me

I’m just fixing your post so perhaps not all people know how to code and fix this “small issues”, so they know the difference between local script and the server script.

Use ApplyDescriptionReset, it works great for both R6 and R15. Some example code is:

local hum = Instance.new('Humanoid') -- Example Humanoid (Replace with the humanoid of the character)

local description = Instance.new('HumanoidDescription')
description.HeadColor = Color3.fromRGB(255, 255, 255) -- Example color

hum:ApplyDescriptionReset(description)

I would recommend having a HumanoidDescription Instance in ReplicatedStorage.

1 Like

I ended up just caching their description before their body color changed (like, on CharacterAdded), and then grabbing it from a table in the script. Then using ApplyDescriptionReset, essentially what you’ve done here.

Great! Glad I could help.

Need more characters

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.