econaut
|
  |
| Joined: 05 Nov 2011 |
| Total Posts: 21 |
|
|
| 29 Jun 2016 11:14 AM |
I am terrible when it comes to scripting, but would anyone mind giving me a script so that a neon part would flicker from neon to some other material randomly? Preferably it flickers along this script so that it looks like a broken flickering light...
while(true) do script.Parent.PointLight.Brightness = 1 print("done") wait(0.0001) script.Parent.PointLight.Brightness = 0 print(script.Parent.PointLight.Brightness) wait(0.7) script.Parent.PointLight.Brightness = .654 print(script.Parent.PointLight.Brightness) wait(0.05) script.Parent.PointLight.Brightness = 0 wait(0.4) script.Parent.PointLight.Brightness = .7 wait(0.3) script.Parent.PointLight.Brightness = 0 wait(0.23) script.Parent.PointLight.Brightness = .63 wait(0.7) script.Parent.PointLight.Brightness = 0 wait(0.4) script.Parent.PointLight.Brightness = .8 wait(0.1) script.Parent.PointLight.Brightness = 0 wait(0.1) end
|
|
|
| Report Abuse |
|
|
|
| 29 Jun 2016 11:22 AM |
while wait() do script.Parent.PointLight.Brightness = 1 script.Parent.Material = Enum.Material.Neon print("done") wait(0.0001) script.Parent.PointLight.Brightness = 0 script.Parent.Material = Enum.Material.SmoothPlastic print(script.Parent.PointLight.Brightness) wait(0.7) script.Parent.PointLight.Brightness = .654 script.Parent.Material = Enum.Material.Neon print(script.Parent.PointLight.Brightness) wait(0.05) script.Parent.PointLight.Brightness = 0 script.Parent.Material = Enum.Material.SmoothPlastic wait(0.4) script.Parent.PointLight.Brightness = .7 script.Parent.Material = Enum.Material.Neon wait(0.3) script.Parent.PointLight.Brightness = 0 script.Parent.Material = Enum.Material.SmoothPlastic wait(0.23) script.Parent.PointLight.Brightness = .63 script.Parent.Material = Enum.Material.Neon wait(0.7) script.Parent.PointLight.Brightness = 0 script.Parent.Material = Enum.Material.SmoothPlastic wait(0.4) script.Parent.PointLight.Brightness = .8 script.Parent.Material = Enum.Material.Neon wait(0.1) script.Parent.PointLight.Brightness = 0 script.Parent.Material = Enum.Material.SmoothPlastic wait(0.1) end |
|
|
| Report Abuse |
|
|
econaut
|
  |
| Joined: 05 Nov 2011 |
| Total Posts: 21 |
|
|
| 29 Jun 2016 11:26 AM |
Hey thanks you solved that issue now how do I make it so when it turns to smooth plastic it will turn to black as if the light is off?
|
|
|
| Report Abuse |
|
|
|
| 29 Jun 2016 11:28 AM |
script.Parent.BrickColor = BrickColor.new('Black')
Put that where your brightness becomes 0.
and use:
script.Parent.BrickColor = BrickColor.new('White')
Put that where your brightness becomes more than 0. |
|
|
| Report Abuse |
|
|
econaut
|
  |
| Joined: 05 Nov 2011 |
| Total Posts: 21 |
|
|
| 29 Jun 2016 11:31 AM |
Sorry for trying to take your time but would you mind doing it? As stated I'm terrible with scripting and don't really understand where in the script I put it just instead of when the brightness becomes greater than 0 make it turn Bright yellow. Please and thank you!
|
|
|
| Report Abuse |
|
|
|
| 29 Jun 2016 11:36 AM |
while wait() do script.Parent.PointLight.Brightness = 1 script.Parent.BrickColor = BrickColor.new('White') script.Parent.Material = Enum.Material.Neon print("done") wait(0.0001) script.Parent.PointLight.Brightness = 0 script.Parent.BrickColor = BrickColor.new('Black') script.Parent.Material = Enum.Material.SmoothPlastic print(script.Parent.PointLight.Brightness) wait(0.7) script.Parent.PointLight.Brightness = .654 script.Parent.BrickColor = BrickColor.new('White') script.Parent.Material = Enum.Material.Neon print(script.Parent.PointLight.Brightness) wait(0.05) script.Parent.PointLight.Brightness = 0 script.Parent.BrickColor = BrickColor.new('Black') script.Parent.Material = Enum.Material.SmoothPlastic wait(0.4) script.Parent.PointLight.Brightness = .7 script.Parent.BrickColor = BrickColor.new('White') script.Parent.Material = Enum.Material.Neon wait(0.3) script.Parent.PointLight.Brightness = 0 script.Parent.BrickColor = BrickColor.new('Black') script.Parent.Material = Enum.Material.SmoothPlastic wait(0.23) script.Parent.PointLight.Brightness = .63 script.Parent.BrickColor = BrickColor.new('White') script.Parent.Material = Enum.Material.Neon wait(0.7) script.Parent.PointLight.Brightness = 0 script.Parent.BrickColor = BrickColor.new('Black') script.Parent.Material = Enum.Material.SmoothPlastic wait(0.4) script.Parent.PointLight.Brightness = .8 script.Parent.BrickColor = BrickColor.new('White') script.Parent.Material = Enum.Material.Neon wait(0.1) script.Parent.PointLight.Brightness = 0 script.Parent.BrickColor = BrickColor.new('Black') script.Parent.Material = Enum.Material.SmoothPlastic wait(0.1) end |
|
|
| Report Abuse |
|
|
econaut
|
  |
| Joined: 05 Nov 2011 |
| Total Posts: 21 |
|
|
| 29 Jun 2016 11:38 AM |
Thanks so much! It's working great!
|
|
|
| Report Abuse |
|
|