ScriptTyron

AutomaticDoors - ATW Speedbuild Episode 2

Sep 2nd, 2019
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.69 KB | None | 0 0
  1. debounce=false
  2.  
  3. function onTouched(hit)
  4.     if debounce==true then return end
  5.     debounce=true
  6.     for i= 1, 60 do
  7.         script.Parent.Parent.LeftDoor.Window.CFrame = script.Parent.Parent.LeftDoor.Window.CFrame * CFrame.new(0.05,0,0)
  8.         script.Parent.Parent.RightDoor.Window.CFrame = script.Parent.Parent.RightDoor.Window.CFrame * CFrame.new(-0.05,0,0)
  9.         wait()
  10.     end
  11.     wait(3)
  12.     for i= 1, 60 do
  13.         script.Parent.Parent.LeftDoor.Window.CFrame = script.Parent.Parent.LeftDoor.Window.CFrame * CFrame.new(-0.05,0,0)
  14.         script.Parent.Parent.RightDoor.Window.CFrame = script.Parent.Parent.RightDoor.Window.CFrame * CFrame.new(0.05,0,0)
  15.         wait()
  16.     end
  17.     debounce=false
  18. end
  19.  
  20. script.Parent.Touched:connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment