generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How do I make a part flash from neon to any other material?

Previous Thread :: Next Thread 
econaut is not online. 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
GraphicsSettings is not online. GraphicsSettings
Joined: 12 Sep 2013
Total Posts: 2883
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 is not online. 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
GraphicsSettings is not online. GraphicsSettings
Joined: 12 Sep 2013
Total Posts: 2883
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 is not online. 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
GraphicsSettings is not online. GraphicsSettings
Joined: 12 Sep 2013
Total Posts: 2883
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 is not online. econaut
Joined: 05 Nov 2011
Total Posts: 21
29 Jun 2016 11:38 AM
Thanks so much! It's working great!


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image