Let's say I want to make a light switch that turns on and off multiple lights. I know how to make it with one light source, but not multiple. All the light sources have parents with the same name and are in the same group. How do I do it?..
Here's the simple script of the light switch:
light = game.Workspace.light2.light.PointLight
function onclick()
light.Enabled = not light.Enabled
script.Parent.Click1:play()
wait(0.1)
script.Parent.Click2:play()
end
script.Parent.ClickDetector.MouseClick:connect(onclick)
"light2"is the model and "light" is one of the multiple parts of the model. It only turns on/off one of the PointLights.
I'm really sorry for my stupidity, but I couldn't find the answer anywhere.

2 comments
To accept answers, click the accept button.
https://gyazo.com/1b1dee0c97996d81807911ce45c50227