I tried different codes GetChildren, GetPlayers, IsInGroup, game.Players.LocalPlayers and it just wouldn't allow anyone to go through the door. I just want TeamColor "Really Blue" also known as Team "ct" to get through the door
local leaderboard = script.Parent.Parent:WaitForChild('leaderboard')
local door = script.Parent
function open()
door.CanCollide = false
for transparency = 0, 1, .1 do
door.Transparency = transparency
wait(.1)
end
end
function close()
for transparency = 1, 0, -.1 do
door.Transparency = transparency
wait(.1)
end
door.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
door.Touched:connect(function(part)
local player = get_player(part)
if not player then return end
local allow = (
game.Players:GetChildren().TeamColor == 'Really blue' --THIS LINE IS KILLING ME
)
if allow then
open()
delay(4, close)
elseif not allow then
game.Players.LocalPlayer:LoadCharacter()
end
end)
Oh and if you are going to reply don't reply to me about "IsInGroup".

1 comment
Also it just loads the character... No errors found