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: Flash

Previous Thread :: Next Thread 
TelaPain is not online. TelaPain
Joined: 19 Sep 2011
Total Posts: 283
25 Mar 2017 04:33 AM
I am making Tower of Terror from Disney, however I need help. On the sign, there is a flashing letter. I need to know the script for how to change a brick from neon to plastic then back to plastic over and over again so it looks like it is broken!
Report Abuse
Disillusions is not online. Disillusions
Joined: 10 Jul 2011
Total Posts: 6365
25 Mar 2017 04:39 AM
wiki.roblox.com/Intro_To_Scripting


capitalist atheist
Report Abuse
ArmaVictorem is not online. ArmaVictorem
Joined: 18 Mar 2015
Total Posts: 1332
25 Mar 2017 04:50 AM
Here's the page on loops.
####################################

Anyways what you want to do is simple, make an infinite loop, like a while true do loop(remember to always put a wait inside while loops). Then put a counter inside it to see if the sign should blink or not, and if you want to get fancy with it and have it randomly turn on and off you'll want to use math.random() to determine if the sign would go on and off.

But for this example since you seem pretty new, We'll go with the random flashing one.

(if the parts of the sign you want to change when flashing are more than 1, use getchildren and a for loop to iterate over parts you want to change)
ht#####################################################################
while true do
math.randomseed(tick()) -- seeds math.random() for more randomness
local x = math.random(2) -- picks between 1 and 2 randomly
if x == 1 then -- if 1 then the part stays flashing or flashes
sign.Part.Material = "Neon"
sign.Part.BrickColor = BrickColor.new("Bright red")
elseif x == 2 then -- if 2 then the part stops flashing or stays off
sign.Part.Material = "Plastic"
sign.Part.BrickColor = BrickColor.new("Black")
end
end
Report Abuse
ArmaVictorem is not online. ArmaVictorem
Joined: 18 Mar 2015
Total Posts: 1332
25 Mar 2017 04:50 AM
wait what???

I can't post wiki links!?
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
25 Mar 2017 04:55 AM
Remove the h tee tee p s at the beginning and you can post most wiki links


Report Abuse
TelaPain is not online. TelaPain
Joined: 19 Sep 2011
Total Posts: 283
25 Mar 2017 09:53 AM
Thanks so much for your help ArmaVictorem! :D
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