I am trying to save a Color3 to DataStore2, which then will be applied to HumanoidDescription colors, which will be applied to the character.
Everything else(Face, shirts, Hair and etc.) works fine, but i cant make the colors work
Here are the relevant parts of the code
local DataStore2 = require(ServerScriptService.DataStore2)
local defCust = {Gender = "Male", Face = "86487700", Hair = "0", Color = "248, 248, 248", Shirt = "http://www.roblox.com/asset/?id=5583364865", Pants = "http://www.roblox.com/asset/?id=1838299111"}
local defQuest = {Quest1 = 0, Quest2 = 0, Quest3 = 0, Quest4 = 0, Quest5 = 0, Quest6 = 0, Quest7 = 0}
DataStore2.Combine(
"DATA", "xp", "nextxp", "lvl", "souls", "gold",
"strength", "toughness", "agility", "wisdom",
"charcustom", "quest"
)
And
local humDescrip = nil
if charcustTable["Gender"] == "Male" then
humDescrip = game.ReplicatedStorage.Customization.Gender:WaitForChild("Male"):Clone()
else if charcustTable["Gender"] == "Female" then
humDescrip = game.ReplicatedStorage.Customization.Gender:WaitForChild("Female"):Clone()
end
end
humDescrip.Name = "ThisDescrip"
humDescrip.Face = charcustTable["Face"]
humDescrip.HairAccessory = charcustTable["Hair"]
local col = charcustTable["Color"]
print(col)
humDescrip.HeadColor = col
humDescrip.LeftArmColor = col
humDescrip.LeftLegColor = col
humDescrip.RightArmColor = col
humDescrip.RightLegColor = col
humDescrip.TorsoColor = col
humDescrip.Parent = custfolder
the problem is local col = charcustTable[“Color”]. It cant turn string into Color3.new or work this way. I have also tried with tonumber(), once again, to no avail
how can i save a color3 to datastore2, or optionally, convert string into color3