I am currently working on a stage that has lights all over it. There are 9 ClickDetectors that'll change the colors of these parts. Right now, the script works, but only for 1 part. I am looking for a way to use one script to change all 36 part colors at the same time.
My current script:
local variable = script.Parent:WaitForChild("ClickDetector") MDST = game.Workspace.MDST.SL1
variable.MouseClick:Connect(function() MDST.BrickColor = BrickColor.new("Really red") end)
The part "SL1" goes up to "SL36". Should I name all of them different or keep them named the same? I've tried adding more parts to it (i.e "game.Workspace.MDST.SL1.SL2.SL3.etc) but it doesn't work. Then, I tried c/p "MDST = game.Workspace.MDST.etc" to add another part in, but it still only changes one part. Please drop down suggestions of ways to fix this, thanks!

2 comments
loop through the all the children of workspace.MDST with a for loop
how would I do that?