of     1   

BluestSteel
#139295648Saturday, July 05, 2014 7:15 AM GMT

I am making a police lightbar and i know how to make it flash and change, i am stumped on how to put a button and have it light up all of the individual lights as one. i have lettered all of the lights and have it built, Please help ASAP.
AnonyAnonymous
#139295898Saturday, July 05, 2014 7:20 AM GMT

Stay calm, first insert a ClickDetector into the part you want to use to activate the lights, then add this. for _,v in pairs(Workspace.LightBar:GetChildren()) do if v.Name == "Light" then v.BrickColor = BrickColor.new() end end Modify this to work with your script.
BluestSteel
#139296297Saturday, July 05, 2014 7:28 AM GMT

Could you explain this as if i have no idea what im doing? like lets say i want it to do This (below) to a pointlight wait(.15) Light.Brightness = 10 wait(.15) Light.Brightness = 0 i want the script to make that loop once the button is pushed and stop once i push the button again
AnonyAnonymous
#139297100Saturday, July 05, 2014 7:46 AM GMT

Alright, tell me the name of the bricks and the models.
BluestSteel
#139297556Saturday, July 05, 2014 7:56 AM GMT

Model name Is "LightBar" And the Colors in the () are NOT in the name of the parts, i just gave you colors for reference. :D Thanks man. A(RED) B(RED) D(RED) E(NAVY BLUE) G(NAVY BLUE) H(NAVY BLUE) I(NAVY BLUE) J(NAVY BLUE) K(NAVY BLUE) L(NAVY BLUE) M(NAVY BLUE) O(NAVY BLUE) P(RED) R(RED) S(RED) T(RED) U(RED) V(RED)
AnonyAnonymous
#139298455Saturday, July 05, 2014 8:16 AM GMT

Could've made this much more efficiently however hopefully you'll enjoy this. while wait() do for _,v in pairs(game.Workspace.LightBar:GetChildren()) do if v.Name == "A" or "B" or "D" or "P" or "R" or "S" or "T" or "U" or "U" or "V" or "D" then v.BrickColor = BrickColor.Red() elseif v.Name == "E" or "G" or "H" or "I" or "J" or "K" or "L" or "M" or "N" or "O" then v.BrickColor = BrickColor.new("Navy blue") wait(.15) Light.Brightness = 10 wait(.15) Light.Brightness = 0 end end end --Could've probably simplified this however otherwise if you have any other questions feel free to inform me and enjoy hopefully.
BluestSteel
#139298603Saturday, July 05, 2014 8:19 AM GMT

Thank you SO much, and do i keep the lights enabled or disabled?
AnonyAnonymous
#139298657Saturday, July 05, 2014 8:21 AM GMT

Either one.
BluestSteel
#139298737Saturday, July 05, 2014 8:23 AM GMT

Uhh when i put it in all it does is make everything red on the lightbar
BluestSteel
#139298778Saturday, July 05, 2014 8:25 AM GMT

Is there any way i can send you the light bar as a file? so you can look at it?
BluestSteel
#139298837Saturday, July 05, 2014 8:26 AM GMT

I have to get off so can i PM you in the morning?
AnonyAnonymous
#139298947Saturday, July 05, 2014 8:29 AM GMT

I can just send you a message with the script then.

    of     1