I’m making something in which I need to change the color of the model. However, the color does not get set correctly.
It should be brown, but the model turns blue https://gyazo.com/0bde1bba60006a3c47dd56403ce0a41c
The actual model color is 96, 161, 203, which is the RGB of the blue color.
if frames % 30 == 0 then
print(objectDefaults[objName].Main['MainColor'])
for i, v in pairs(objClone:GetDescendants()) do
if v.Name == 'Main' and mainCustomizerSelected and not v:IsA('Weld') and not v:IsA('Texture') then
if currentColor == nil then
currentColor = objectDefaults[objName].Main['MainColor']
end
print('Haha')
print(currentColor)
--v.Color = currentColor
v.Color = currentColor
if currentMaterial == nil then
currentMaterial = objectDefaults[objName].Main['MainMaterial']
end
v.Material = currentMaterial
elseif v.Name == 'Extra' and not mainCustomizerSelected and not v:IsA('Weld') and not v:IsA('Texture') then
if currentColor == nil then
currentColor = objectDefaults[objName].Extra['ExtraColor']
end
print('Che')
print(currentColor)
v.Color = currentColor
if currentMaterial == nil then
currentMaterial = objectDefaults[objName].Extra['ExtraMaterial']
end
v.Material = currentMaterial
end
end
end
As you can see here, it will print the color and set the color. But it prints “Haha” and then “160, 95, 53” so it obviously isn’t setting the color correctly. Can you please help me out?