Humanoid Description isn't working properly

Hey, everyone!
I’ve been trying to make a player’s body colors a certain set of colors (specifically camo and rust), but when I use humanoid description to change a character’s body colors, their colors are all white instead of what I wanted! Here’s my code. It’s in a for loop that loops through the players:

local HumanoidDescription = hum:GetAppliedDescription()
				
				HumanoidDescription.HeadColor = Color3.new(58, 125, 21) -- Camo color
				HumanoidDescription.LeftArmColor = Color3.new(58, 125, 21)
				HumanoidDescription.LeftLegColor = Color3.new(143, 76, 42)
				HumanoidDescription.RightArmColor = Color3.new(58, 125, 21)
				HumanoidDescription.RightLegColor = Color3.new(143, 76, 42)
				HumanoidDescription.TorsoColor = Color3.new(143, 76, 42)
				
				HumanoidDescription.Shirt = nil
				HumanoidDescription.Pants = nil
				
				hum:ApplyDescription(HumanoidDescription)
			

yes, i tried researching my issue and found nothing. The colors are camo and rust. If you all have any questions I’ll be more than happy to answer.

Thank you!

Edit: My usual character colors are black, not white. Also, I tried to accomplish this in two different places and got the same error

1 Like

Is that the full script or just a part of it, if it’s not then please reply or edit the topic with the full script, and also are there any errors in the output? Or is it not outputting anything?

1 Like

It’s because you are using Color3.new instead of Color3.fromRGB.

If you look on the wiki page for Color3, its .new constructor specifically says:

The parameters should be on the range [0, 1].

1 would be the equivalent of 255, whereas 0 would be the equivalent of 0.

There are two ways to get what you want.

1. Using .fromRGB
Use Color3.fromRGB, as this is the easiest way to do what you want.

color = Color3.fromRGB(58, 125, 21) -- Camo

2. Using .new divided by 255
Alternatively, you can use Color3.new if you divide all of the properties by 255.

color = Color3.new(58/255, 125/255, 21/255) -- Camo

Personally, I would just go with method #1. Saves you some headaches down the road.

3 Likes

Hey! Thanks for the reply. I’ll try this later when I have access to studio and inform you on what happens.

Edit: It works! Thanks a lot

Sorry for that! I was rushing when making this post and didn’t include the whole script. I can’t give it to you right now because I don’t have access to studio, and to answer your other answer: no, I have no errors in the output.

However, as for now, I can tell you that I do have something similar to this:

local infectedNum1 = math.random(1, #plrs) --I have a table of the players in the game
local infectedNum2 = math.random(1, #plrs)

if infectedNum2 == infectedNum2 then
   function RepickNum() -- Function that repicks the number, isn’t included in this fragment of code
end

for i, player in pairs(plrs) do
   local hum = player.Character.Humanoid
   if i == infectedNum2 or i == infectedNum1 then
      --this is where I put my humanoid description script
   end
end