local plr = game.Players.LocalPlayer.PlayerGui.MS.a
for i,v in pairs(script.Parent.Parent.a:GetDescendants(plr)) do
local ic = i
for d = 1, #ic do
if d:IsA("Model") then
local model = d
for c = 1, #model do
local child = model[c]
if child:IsA("BasePart") then
child = script.Parent.Parent.Red.Value -- Color3Value
print("Colour has change")
end
end
You are attempting to set “child”, a BasePart, as a Color3 value within your Color3 Value, although, I’m slightly confused as to what you’re trying to do. Are you trying to set the Color3 value of “child” to the color in your Value?
Check line 7, the value there is not a table and is instead a number. Make 100% sure that you are assigning it the correct value. In this case, for i, v in next...… i will be the index and v will be the object/value.
--local plr = game.Players.LocalPlayer.PlayerGui.MS.a
local plr
for i,v in pairs(script.Parent.Parent.a:GetDescendants(plr)) do
local ic = plr
if ic:IsA("Model") then
local model = ic
for c = 1, #model do
local child = model[c]
if child:IsA("BasePart") then
script.Parent.Parent.Red.Value = child.Color -- Color3Value
print("Colour has change")
end
end