Any way to simplify this script into less lines?
colour = "Really black" local children = Workspace.Vehicles.Jeep.VehicleBody.Color:GetChildren() for i = 1, #children do children[i].BrickColor = BrickColor.new(colour) end colour = "Really black" local children = Workspace.Vehicles.Jeep.VehicleBody.Essentials.Grill:GetChildren() for i = 1, #children do children[i].BrickColor = BrickColor.new(colour) end colour = "Really black" local children = Workspace.Vehicles.Jeep.VehicleBody.Essentials.RearLights:GetChildren() for i = 1, #children do children[i].BrickColor = BrickColor.new(colour) end colour = "Really black" local children = Workspace.Vehicles.Jeep.VehicleBody.Essentials.FrontLights:GetChildren() for i = 1, #children do children[i].BrickColor = BrickColor.new(colour) end colour = "Really black" local children = Workspace.Vehicles.Jeep.VehicleBody.Essentials.Windows:GetChildren() for i = 1, #children do children[i].BrickColor = BrickColor.new(colour) end colour = "Really black" local children = Workspace.Vehicles.Jeep.VehicleBody.Essentials.TopCover:GetChildren() for i = 1, #children do children[i].BrickColor = BrickColor.new(colour) end colour = "Really black" local children = Workspace.Vehicles.Jeep.VehicleBody.Essentials.DoorHandles:GetChildren() for i = 1, #children do children[i].BrickColor = BrickColor.new(colour) end colour = "Really black" local children = Workspace.Vehicles.Jeep.VehicleBody.Wheels.RBWheel:GetChildren() for i = 1, #children do children[i].BrickColor = BrickColor.new(colour) end colour = "Really black" local children = Workspace.Vehicles.Jeep.VehicleBody.Wheels.RFWheel:GetChildren() for i = 1, #children do children[i].BrickColor = BrickColor.new(colour) end colour = "Really black" local children = Workspace.Vehicles.Jeep.VehicleBody.Wheels.LFWheel:GetChildren() for i = 1, #children do children[i].BrickColor = BrickColor.new(colour) end colour = "Really black" local children = Workspace.Vehicles.Jeep.VehicleBody.Wheels.LBWheel:GetChildren() for i = 1, #children do children[i].BrickColor = BrickColor.new(colour) end
You can shorten the code by using a for loop.
for a = 1,11 do colour = "Really black" local children = Workspace.Vehicles.Jeep.VehicleBody.Color:GetChildren() for i = 1, #children do children[i].BrickColor = BrickColor.new(colour) end end