Advertisement
dubleeyrblxx

Team only door -- Roblox

Jul 4th, 2020
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. -- Team only door
  2. -- Put in the team door
  3. local team = game.Teams.[Your Team] -- Don't add the [] Unless the team is more then one word
  4. local door = script.Parent
  5.  
  6. door.Touched:Connect(function(hit)
  7.     local humanoid = hit.Parent:FindFirstChild("Humanoid")
  8.     if humanoid then
  9.         local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
  10.         if plr.Team == team then
  11.             door.CanCollide = false
  12.             door.Transparency = .5
  13.             wait (0.6)
  14.             door.CanCollide = true
  15.             door.Transparency = 0
  16.            
  17.            
  18.         end
  19.     end
  20. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement