Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

Shorter Script, please? {Solved}

Asked by 11 years ago

Here is my script:

01s = script.Parent
02 
03while true do
04s.Light1.BrickColor = BrickColor.new("Teal")
05s.Light2.BrickColor = BrickColor.new("Teal")
06s.Light3.BrickColor = BrickColor.new("Teal")
07s.Light4.BrickColor = BrickColor.new("Teal")
08s.Light5.BrickColor = BrickColor.new("Teal")
09s.Light6.BrickColor = BrickColor.new("Teal")
10s.Light7.BrickColor = BrickColor.new("Teal")
11s.Light8.BrickColor = BrickColor.new("Teal")
12wait(30)
13s.Light1.BrickColor = BrickColor.new("Hot pink")
14s.Light2.BrickColor = BrickColor.new("Hot pink")
15s.Light3.BrickColor = BrickColor.new("Hot pink")
View all 57 lines...

im a begginer.

2 answers

Log in to vote
2
Answered by
Sublimus 992 Moderation Voter
11 years ago
01while true do
02    for i = 1,8 do
03        s:findFirstChild("Light"..i).BrickColor = BrickColor.new("Teal")
04    end
05    wait(30)
06    for i = 1,8 do
07        s:findFirstChild("Light"..i).BrickColor = BrickColor.new("Hot pink")
08    end
09    wait(30)
10    for i = 1,8 do
11        s:findFirstChild("Light"..i).BrickColor = BrickColor.new("Institutional white")
12    end
13    wait(30)
14    for i = 1,8 do
15        s:findFirstChild("Light"..i).BrickColor = BrickColor.new("Really red")
View all 25 lines...
0
No, this should work. What didn't work? BlueTaslem 18071 — 11y
1
sorry he forgot the first line and i though it is the script without the first line... im stupid,,, KillSide 0 — 11y
Ad
Log in to vote
-2
Answered by 11 years ago

I'm pretty sure you can just use the get children function, but in reply KillSide and BlueTaslems comments, try using the colors codes nstead of names. Otherwise, Blues script should work.

Answer this question