Children = game.Workspace.TestingModel:GetChildren() function onClick() for x=1, #Children do Children[1].BrickColor = BrickColor.new(BrightRed) end end game.Workspace.RedButton.ClickDetector.MouseClick:connect(onClick)
What are you trying to do? Also I see one error. On line 4 it should be.
Children[1].BrickColor = BrickColor.new("Bright red")
I don't see any other errors. Hope this helps, but can you please tell me what you are actually trying to do?
This is the fixed script:
Children = game.Workspace.TestingModel:GetChildren() function onClick() for x=1, #Children do Children[1].BrickColor = BrickColor.new("Bright red") end end game.Workspace.RedButton.ClickDetector.MouseClick:connect(onClick)
You had an error were it said:
Children[1].BrickColor = BrickColor.new("Bright red")
Hope this has helped and also what is it you are trying to do?