ok,put this script in the door,make the door invisable then put a forcefield in it and replace Bright red in the 2nd line to what color team u want it to be
button = script.Parent
teamcolor = "Bright red"
function onTouched(hit)
if hit.Parent:findFirstChild("Humanoid")~= nil then
local user = game.Players:GetPlayerFromCharacter(hit.Parent)
if user ~= nil then
if user.TeamColor ==BrickColor.new (teamcolor) then
button.CanCollide = false
wait(1)
button.CanCollide = true
end
end
end
end
button.Touched:connect(onTouched)
|