So, I've been trying to figure out how to properly rebuild my ELS script, but when I brought it up to someone else I just got scrutinized for how old and Sh*tty it was, any idea's and recommendations would be fantastic. Here is some of the code:
ELS = script.Parent
while true do
wait(0)
if script.Parent.Lon.value == true and script.Parent.TAPattern.value == 4 then
ELS.RTA1.BrickColor = BrickColor.new ("Medium blue")
ELS.RTA2.BrickColor = BrickColor.new ("Lily white")
ELS.RTA3.BrickColor = BrickColor.new ("Medium blue")
ELS.RTA4.BrickColor = BrickColor.new ("Lily white")
ELS.RTA5.BrickColor = BrickColor.new ("Medium blue")
ELS.RTA6.BrickColor = BrickColor.new ("Lily white")
ELS.RTA7.BrickColor = BrickColor.new ("Medium blue")
ELS.RTA8.BrickColor = BrickColor.new ("Lily white")
ELS.RTA9.BrickColor = BrickColor.new ("Medium blue")
ELS.RTA10.BrickColor = BrickColor.new ("Lily white")
ELS.RTA1.Transparency = 0
ELS.RTA2.Transparency = 1
ELS.RTA3.Transparency = 1
ELS.RTA4.Transparency = 1
ELS.RTA5.Transparency = 1
ELS.RTA6.Transparency = 1
ELS.RTA7.Transparency = 1
ELS.RTA8.Transparency = 1
ELS.RTA9.Transparency = 1
ELS.RTA10.Transparency = 1
wait(0.01)
ELS.RTA1.Transparency = 1
ELS.RTA2.Transparency = 0
ELS.RTA3.Transparency = 1
ELS.RTA4.Transparency = 1
ELS.RTA5.Transparency = 1
ELS.RTA6.Transparency = 1
ELS.RTA7.Transparency = 1
ELS.RTA8.Transparency = 1
ELS.RTA9.Transparency = 1
ELS.RTA10.Transparency = 1
wait(0.01)
ELS.RTA1.Transparency = 1
ELS.RTA2.Transparency = 1
ELS.RTA3.Transparency = 0
ELS.RTA4.Transparency = 1
ELS.RTA5.Transparency = 1
ELS.RTA6.Transparency = 1
ELS.RTA7.Transparency = 1
ELS.RTA8.Transparency = 1
ELS.RTA9.Transparency = 1
ELS.RTA10.Transparency = 1
You can see how "Sh*tty" it is. RTA = Rear Traffic Advisor (I have the TA on the lightbar and the one in the rear window)

4 comments
This is a bad answer. Calling wait in the conditional part of a while loop, not using events (Changed would work best here), and abusing semicolons.
Abusing semicolons. Bro I'm coming from a background of 12 years of PHP and JavaScript. All a semicolon does is an end of line delimiter. If you think a .Changed event would work best here, then instead of downvoting, make your own damn answer on here with how you would do it. I said this is "PERSONALLY" how I would do it, didn't say it was the best or worst way.
lol
Using a discard function inside of the wait loop has no consequences. If you have no use for the delta nor the total script runtime then it's completely fine to use wait() as a condition. Remember, if you can't use function calls in a condition, you can't use variables in a condition. It's essentially the same thing! So much for "programmerHere" lol