Well I wanted team "ct" enter this door. Error says their is no property "Team" in Players. (Ex. Player.Team.TeamColor)
ctdoor = script.Parent
function open()
ctdoor.CanCollide = false
for transparency = 0, 1, .1 do
ctdoor.Transparency = transparency
wait(.1)
end
end
function close()
for transparency = 1, 0, -.1 do
ctdoor.Transparency = transparency
wait(.1)
end
ctdoor.CanCollide = true
end
function get_player(part)
for _, player in ipairs(game.Players:GetPlayers()) do
if part:IsDescendantOf(player.Character) then
return player
end
end
end
ctdoor.Touched:connect(function(part)
local player = get_player(part)
if not player then return end
local allow = (
player.Team.TeamColor == 'Really blue' --this doesn't works <<<
)
if allow then
open()
delay(4, close)
end
end)

1 comment
I don't think "IsInGroup" helps it just does nothing. IsInGroup works for groups connected with roblox and not TeamColor