Advertisement
Guest User

Untitled

a guest
Feb 28th, 2020
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. local door = script.Parent
  2. door.Anchored = true
  3. function open()
  4.     door.Transparency = 1
  5.     door.CanCollide = false
  6. end
  7.  
  8. function close()
  9.     door.Transparency = 0
  10.     door.CanCollide = true
  11. end
  12.  
  13.  
  14. game.Players.PlayerAdded:Connect(function(p)
  15.     p.Chatted:Connect (function(msg)
  16.         if message == "open door" then
  17.             open()
  18.         end
  19.        
  20.        
  21.         if message == "close door" then
  22.             close()
  23.         end
  24. end)
  25. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement