econaut
|
  |
| Joined: 05 Nov 2011 |
| Total Posts: 21 |
|
|
| 29 Jun 2016 11:11 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:15 AM |
script.Parent.PointLight.Color = Color3.new(math.random(),math.random(),math.random())
Insert this after every time the light's brightness is 0. |
|
|
| Report Abuse |
|
|
econaut
|
  |
| Joined: 05 Nov 2011 |
| Total Posts: 21 |
|
|
| 29 Jun 2016 11:16 AM |
SORRY, not color material is what I meant! Pardon where it says color.
|
|
|
| Report Abuse |
|
|
|
| 29 Jun 2016 11:19 AM |
script.Parent.Touched:connect(function() script.Parent.BrickColor = BrickColor.new("Neon Green") end)
script.Parent.TouchEnded:connect(function() script.Parent.BrickColor = BrickColor.new("Medium stone grey") end)
An excerpt from a tutorial with a little tweak. |
|
|
| Report Abuse |
|
|
V_PN
|
  |
| Joined: 08 May 2011 |
| Total Posts: 121 |
|
|
| 29 Jun 2016 11:24 AM |
local upd = 1 -- How fast it changes.
while true do script.Parent.Material = "Neon" wait(upd) script.Parent.Material = "ENTER MATERIAL HERE" end
--/ V_PN
#code print(' ~ floppy disc ') |
|
|
| Report Abuse |
|
|
|
| 29 Jun 2016 11:25 AM |
Materials = {"Plastic","Neon","WoodPlanks","Slate"} --ect you can add the rest of them
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
Add this when you want it to change:
script.Parent.Material = Materials[math.random(#Materials)] |
|
|
| Report Abuse |
|
|