Hello, thanks for reading.
Error: 17:27:14.449 - Workspace.Meltdown Detector:63: 'end' expected (to close 'function' at line 6) near '<eof>'
I am having trouble with GetChildren while getting to the destination.
So, this is part of my script
1 | local mainframelights = workspace.MainframeLights:GetChildren() |
2 | for i = 1 , #mainframelights do |
3 | mainframelights.Light.PointLight [ i ] .Color = Color 3. new( 255 , 0 , 0 ) |
4 | end |
And this is my module workspace:
01 | Workspace |
02 | MainframeLights (Module) |
03 | Light (Module) |
04 | Light (Part) |
05 | PointLight (PointLight) |
06 | Light (Module) |
07 | Light (Part) |
08 | PointLight (PointLight) |
09 | Light (Module) |
10 | Light (Part) |
11 | PointLight (PointLight) |
12 | Light (Module) |
13 | Light (Part) |
14 | PointLight (PointLight) |
15 | Light (Module) |
16 | Light (Part) |
17 | PointLight (PointLight) |
18 | Light (Module) |
19 | Light (Part) |
20 | PointLight (PointLight) |
Thanks if you helped! :)
Indent your code to find the missing end. Also for:
1 | mainframelights.Light.PointLight [ i ] .Color = Color 3. new( 255 , 0 , 0 ) |
Get rid of the [i] it just breaks it.
Switch Color3.new(255, 0, 0)
to Color3.new(1, 0, 0)
as Color3 is 0-1. (divide by 255 if you want a specific colour)