SmileyS

Team access door script

Aug 9th, 2021
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. script.Parent.ProximityPrompt.Triggered:Connect(function(plr)
  2. if plr.TeamColor == BrickColor.new("Really red") then
  3. script.Parent.BrickColor = BrickColor.new("Really red")
  4. script.Parent.CanCollide = true
  5. else
  6. if plr.TeamColor == BrickColor.new("Lapis") then
  7. if script.Parent.CanCollide == true then
  8. script.Parent.BrickColor = BrickColor.new("Lime green")
  9. script.Parent.CanCollide = false
  10. else
  11. if script.Parent.CanCollide == false then
  12. script.Parent.BrickColor = BrickColor.new("Really red")
  13. script.Parent.CanCollide = true
  14. end
  15. end
  16. end
  17. end
  18. end)
Advertisement
Add Comment
Please, Sign In to add comment