Maybe this’ll help
(Not mean to be copy and pasted, meant to give the idea and help, tho u could probably copy and paste it)
-- Objects
local folderScreens = workspace.Screens
local off = workspace.Off
local clickDetector = off.ClickDetector
-- Values
local Color_To_Change_To = BrickColor.new("Really Black")
-- Functions
local function ChangeColor()
for Index, Object in pairs(folderScreens:GetChildren()) do
if Object:IsA("BasePart") then
Object.BrickColor = Color_To_Change_To
end
end
end
-- Connections
clickDetector.MouseClick:Connect(ChangeColor)
Sorry if there’s any typos, it’s 4AM where I live, hopefully this helps
Some little bits of advice:
You don’t have to do game.Workspace, workspace is already there fore you to use!
I assume it was for an example but iterating through parts is much better than setting them all individually! (And easier!!!)
Declaring and referencing variables is a better practice and use of a computer’s resources than calling something like game.Workspace.Screens every time