Hey Devs!
We’re going straight to the point 
How can I get the children on this folder:

And put it to this script so all children would change color
frame.Button.MouseButton1Down:Connect(function()
local self = module.New(script.Parent,mouse)
self:Init()
local originalColor = part.Color
self:SetColor(originalColor) --set color to current part color
self.Finished:Connect(function(color)
part.Color = color
end)
self.Updated:Connect(function(color)
part.Color = color
end)
self.Canceled:Connect(function()
--color canceled, set back to original color
part.Color = originalColor
end)
end)
You can use a for
loop to get the children of the folder using pairs
and GetChildren()
.
for index, part in pairs(folder:GetChildren()) do
--place code here
end
I’ve already tried this earlier and it seems to not working 
Can you show the code you have with the loop?
Here
for index, part in pairs(folder:GetChildren()) do
frame.Button.MouseButton1Down:Connect(function()
local self = module.New(script.Parent,mouse)
self:Init()
local originalColor = part.Color
self:SetColor(originalColor) --set color to current part color
self.Finished:Connect(function(color)
part.Color = color
end)
self.Updated:Connect(function(color)
part.Color = color
end)
self.Canceled:Connect(function()
--color picker canceled, set back to original color
part.Color = originalColor
end)
end)
end
You should put the loop inside the first event function I believe.
1 Like
Okay it now seems to be working. I appreciate the help!!