Advertisement
Guest User

codigo

a guest
Apr 2nd, 2020
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. local Brick = true
  2.  
  3. local Parent = script.Parent
  4.  
  5. local function on()
  6. Brick = true
  7. Parent.Transparency = 0
  8. Parent.CanCollide = true
  9. end
  10.  
  11. local function off()
  12. Brick = false
  13. Parent.Transparency = 0.10
  14. Parent.CanCollide = false
  15. end
  16.  
  17. local function OnClicked()
  18. if Brick == true then off() else on() end
  19. end
  20.  
  21. Parent.ClickDetector.MouseClick:connect(OnClicked)
  22. on()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement