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 |
|
|
|
| 25 Mar 2017 04:39 AM |
wiki.roblox.com/Intro_To_Scripting
capitalist atheist |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 25 Mar 2017 04:50 AM |
wait what???
I can't post wiki links!? |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 19 Sep 2011 |
| Total Posts: 283 |
|
|
| 25 Mar 2017 09:53 AM |
| Thanks so much for your help ArmaVictorem! :D |
|
|
| Report Abuse |
|
|