Unable to assign a string to a BodyColor

I am trying to get a random string from a table and apply that string to a BodyColor3 property but it doesn’t work.

Code;

local Skintones = {
	"255, 204, 153", --Pastel brown
--there is obviously more colors but I shortened it to one to make it simple for the post's sake
}

function changeSkintone()
	local skintone = Skintones[math.random(1, #Skintones)]
	script.Parent.HeadColor3 = skintone
	script.Parent.LeftArmColor3 = skintone
	script.Parent.LeftLegColor3 = skintone
	script.Parent.RightArmColor3 = skintone
	script.Parent.RightLegColor3 = skintone
	script.Parent.TorsoColor3 = skintone
end

changeSkintone()

This is a script inside of “Body Colors” in a dummy

local Skintones = {
	Color3.fromRGB(255, 204, 153), --Pastel brown
--there is obviously more colors but I shortened it to one to make it simple for the post's sake
}
2 Likes


My bad, small f in From: Color3.fromRGB(255, 204, 153)

2 Likes

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