This door is meant to allow people within a team to go through, but nobody else.
local Debounce = false
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and Debounce == false then
Debounce = true
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr.Team == game.Teams.Police then
script.Parent.CanCollide = false
wait(5)
script.Parent.CanCollide = true
Debounce = false
end
end
end)

1 comment
The debounce in your script only becomes false if they are in the right team. But it should also become false even if they aren't in the right team.