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 flicker from neon to any other color?

Previous Thread :: Next Thread 
econaut is not online. 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
kangerujack is not online. kangerujack
Joined: 08 Nov 2009
Total Posts: 690
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 is not online. 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
hephzibah112 is not online. hephzibah112
Joined: 21 Sep 2012
Total Posts: 327
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 is not online. 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
kangerujack is not online. kangerujack
Joined: 08 Nov 2009
Total Posts: 690
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
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