I want a loop to change the color of all parts in a folder into a single color. However, the code below only changes one of the parts. There might be a really simple fix, but I’m a little off today, could anyone pitch in?
local PartsFolder = workspace.PartsFolder:GetChildren()
for _,Part in pairs(PartsFolder) do
if Part:IsA('BasePart') then
Part.BrickColor = BrickColor.new('Neon orange')
end break
end
did you make sure there’s more than one part in the folder when this script loads?
if another script is adding the parts or if this script runs while the game is loading, this script may not detect them
Nevermind, I had something else in the loop that I removed in the OP that was conflicting with it. I’ve since removed it and it works as expected, thanks!