I am getting an error where it’s getting a string instead of color3, how would I fix this?
Script
local TakenColors = {}
local AvailableColors = {
"1, 0.686275, 0.882353",
"0.552941, 0.219608, 0.219608",
"1, 0.34902, 0.34902",
"1, 0.686275, 0.431373",
"0.992157, 0.917647, 0.552941",
"0.156863, 0.498039, 0.278431",
"0.541176, 0.670588, 0.521569",
"0.501961, 0.733333, 0.858824",
"0.0509804, 0.411765, 0.67451",
"0.54902, 0.356863, 0.623529",
"0.490196, 0.494118, 0.52549",
"0.105882, 0.164706, 0.207843",
"0.533333, 0.431373, 0.368627",
"0.337255, 0.258824, 0.211765"
}
game:GetService("Players").PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local function PickColor()
local ChosenColor = AvailableColors[math.random(1,AvailableColors)]
if not table.find(TakenColors, ChosenColor) then
table.insert(TakenColors, ChosenColor)
Character["Body Colors"].TorsoColor3 = ChosenColor
Character["Body Colors"].LeftLegColor3 = ChosenColor
Character["Body Colors"].RightLegColor3 = ChosenColor
else
PickColor()
end
end
PickColor()
end)
end)