So I’m making a car script where you buy it it will spawn you a car and stuff, but I’m lazy to get every color part to color the color they wanted, so I tried this and I don’t see the problem here.
for _, child in pairs(Colors:GetChildren()) do
if child.Name == "Change" then
child.Color = Color3.new(1, 0.666667, 0.498039)
end
end
It only changed 1 part color, how do I make it so it changes all the others?
(The color variable just points out where the colorparts are at.)
Yes but can I see? Because I did this and it worked:
local color = workspace
for _, child in pairs(color:GetChildren()) do
if child.Name == "Change" then
child.Color = Color3.new(1, 0.666667, 0.498039)
end
end
hmmm, this is weird because I did the same thing and it works for me:
local Colors = game.ServerStorage.Cars.Sedan.Body.Colors
for _, child in pairs(Colors:GetChildren()) do
if child.Name == "Change" then
child.Color = Color3.new(1, 0.666667, 0.498039)
end
end
local Colors = game.ServerStorage:WaitForChild('Cars'):WaitForChild('Body'):WaitForChild('Colors')
wait(1)
for _, child in pairs(Colors:GetChildren()) do
if child.Name == "Change" then
child.Color = Color3.new(1, 0.666667, 0.498039)
end
end