Im trying to save the players skin color in DataStore but i can't get it to work because im always getting black color but my color was brown when i saved, here is what i have:
local information = { ["SkinR"] = char.Head.Color.R; ["SkinG"] = char.Head.Color; ["SkinB"] = char.Head.Color; } if info.SkinR then print("skin color found") local color1,color2,color3 = info.SkinR,info.SkinG,info.SkinB local color = Color3.new(color1,color2,color3) print(info.SkinR) print(color) char.Head.Color = color char.UpperTorso.Color = color char.LowerTorso.Color = color char.RightLowerArm.Color = color char.LeftLowerArm.Color = color char.RightUpperArm.Color = color char.LeftUpperArm.Color = color char.RightLowerLeg.Color = color char.LeftLowerLeg.Color = color char.RightUpperLeg.Color = color char.LeftUpperLeg.Color = color char.RightFoot.Color = color char.LeftFoot.Color = color char.RightHand.Color = color char.LeftHand.Color = color
You are doing
local information = { ["SkinR"] = char.Head.Color.R; ["SkinG"] = char.Head.Color; ["SkinB"] = char.Head.Color; }
You are forgetting to index both G and B to get their colours, which means that you are attempting to instantiate a Color3 with (float, color3, color3) when in reality it takes (float, float, float), to fix this simply change it to
local information = { ["SkinR"] = char.Head.Color.R; ["SkinG"] = char.Head.Color.G; ["SkinB"] = char.Head.Color.B; }
And it should work