BodyColor produces wrong Color3 values

Hello!

I’m trying to create a customization system and save the RGB values for the Skin Color so that it applies in the main game.

I’ve tested the values when it saves and goes over to the main game and it is the same as the customization game, but when I apply the values to the BodyColor object of the character, it is entirely different:
image

RGB Value used to make skin color:
image

BodyColors produced:
image

I’m confused and thought it was just me converting the Color3 values wrongly, but that wasn’t the case.
This also happens to the hair, which explains why the hair color looks so gray and dull.

Code:

if player.Data.Skin.Value == Color3.fromRGB(0,0,0) then
			player.Character["Body Colors"].TorsoColor3 = Color3.fromRGB(255, 221, 184)
			player.Character["Body Colors"].HeadColor3 = Color3.fromRGB(255, 221, 184)
			player.Character["Body Colors"].LeftArmColor3 = Color3.fromRGB(255, 221, 184)
			player.Character["Body Colors"].RightArmColor3 = Color3.fromRGB(255, 221, 184)
			player.Character["Body Colors"].RightLegColor3 = Color3.fromRGB(255, 221, 184)
			player.Character["Body Colors"].LeftLegColor3 = Color3.fromRGB(255, 221, 184)
		else
			player.Character["Body Colors"].TorsoColor3 = player.Data.Skin.Value
			player.Character["Body Colors"].HeadColor3 = player.Data.Skin.Value
			player.Character["Body Colors"].LeftArmColor3 = player.Data.Skin.Value
			player.Character["Body Colors"].RightArmColor3 = player.Data.Skin.Value
			player.Character["Body Colors"].RightLegColor3 = player.Data.Skin.Value
			player.Character["Body Colors"].LeftLegColor3 = player.Data.Skin.Value
		end

Not sure what’s going on, but any help is appreciated!

1 Like

try doing Color3.fromRGB(player.Data.Skin.Value)
not sure if this’ll work im on phone lol

It converts the Body Colors to (0,0,0) not sure why it works like that it just does.
and also the skin data is a Color3 Value so im pretty sure thats unnecessary

Why is game.Players.ChillyDedM8.Data.Skin.Value a stringValue why not make it a Color3Value?

Also here is your fix if your are gonna keep game.Players.ChillyDedM8.Data.Skin.Value a stringValue
You are trying to convert a string to color3.

player.Character["Body Colors"].TorsoColor3 = Color3.fromRGB(table.unpack(string.split(player.Data.Skin.Value, ", ")))

Tell me if that works.

It is not a string value
image

Then why does print(game.Players.ChillyDedM8.Data.Skin.Value) result in “95, 53, 36”
Color3 can only be on the range [0, 1]

It should result “0.372549, 0.207843, 0.141176”

The Color3 is already converted into RGB.

If game.Players.ChillyDedM8.Data.Skin.Value is in fact a Color3Value there is no reason why this does not work.

try
Color3.fromRGB(value.R, value.G, value.B)

1 Like

Didn’t think about it this way, and it worked! Thank you so much!