I want to know how I would properly make it so it only lets a player in not a team.
local team = game.Teams.Blue
local door = script.Parent
door.Touched:connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr.Team == team then
door.CanCollide = false
door.Transparency = .5
wait(1)
door.CanCollide = true
door.Transparency = 0
else
humanoid.Health = 0
end
end
end)

1 comment
Formatted codes in codeblock.