Advertisement
EmeraldSlash

Scripting Helpers #1

Nov 24th, 2016
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. local door = script.Parent.Parent.Core
  2.  
  3. function changeCol(col,waitTime)
  4.     for i = 1,9 do
  5.         local light = door:FindFirstChild("Light" ..i)
  6.         light.BrickColor = col
  7.         wait(waitTime or 0)
  8.     end
  9. end
  10.  
  11. function enter()
  12.     -- cframe
  13.     local col = BrickColor.new("Dark green")
  14.     changeCol(col)
  15.     wait(1)
  16.     col = BrickColor.new("Bright red")
  17.     changeCol(col,3)
  18.     wait(1)
  19.     -- velocity
  20.     wait(20)
  21.     col = BrickColor.new("Dark green")
  22.     changeCol(col)
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement