Hello, so basically I want to select all the point lights in game
How can I do this? is there any plugin for this? or a script I can run in the command bar?
Any help is appreciated!
Hello, so basically I want to select all the point lights in game
How can I do this? is there any plugin for this? or a script I can run in the command bar?
Any help is appreciated!
Try using the Explorer tab under “View”. Typing the name of the light part in the search bar will enable you to select them all.
Example:
Hey! this is a good option, but, I have over 3000 lights and going 1 by 1 will take a long time, is there any quicker way to do it?
You can do what @goldencowboy suggested, or, if you’re looking for a script, you can use something like this:
for i,GameChildren in pairs(game:GetChildren()) do
for i,PointLight in pairs(GameChildren:GetChildren()) do
if PointLight:IsA("PointLight") then
--Do Stuff here
end
end
end
Hey!, I’m not really into scripting, how can I use this to select all the point lights in the viewport, in the studio, or in case we have to do it through the script, I want to lower the range and the brightness, how should I do that?
You can’t run scripts in studio itself. To select something in studio, you have to do what @goldencowboy suggested. If you’re looking to change the lighting for everything once a player joins the game you would do:
for i,GameChildren in pairs(game:GetChildren()) do
for i,PointLight in pairs(GameChildren:GetChildren()) do
if PointLight:IsA("PointLight") then
PointLight.Range = "" --Insert Range here
PointLight.Brightness = "" --Insert brightness here
end
end
end
However, this will not change brightness for you in studio, instead it will change the brightness of lights in the game server. If your looking to do this in studio without a script, you would need to do it manually.
Couldn’t you find them all via explorer than just hit CTRL + A to select all?
No because there are many in the folders and Ctrl+A also selects the parts that contain a Point Light etc
If anyone else need it in the future.
The @goldencowboy option for studio is fine, but there is a more efficient way
The @Voliiqs one works for in -game light changes when a player joins the game, but don’t change studio view
What I did was:
With “Part Picker” plugin
Select those parts that contain point lights, right click and “select children”, change the range or brightness, then do that with all the parts you believe have point lights, In my case I selected the lamps, windows, etc. You can change hundreds of pieces with a couple clicks this way, It is way quicker than clicking 1 by 1 in the workspace