How do you allow people through Door restrictions?
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
01 | local leaderboard = script.Parent.Parent:WaitForChild( 'leaderboard' ) |
02 | local door = script.Parent |
05 | door.CanCollide = false |
06 | for transparency = 0 , 1 , . 1 do |
07 | door.Transparency = transparency |
13 | for transparency = 1 , 0 , -. 1 do |
14 | door.Transparency = transparency |
17 | door.CanCollide = true |
21 | function get_player(part) |
22 | for _, player in ipairs (game.Players:GetPlayers()) do |
23 | if part:IsDescendantOf(player.Character) then |
30 | door.Touched:connect( function (part) |
31 | local player = get_player(part) |
32 | if not player then return end |
35 | game.Players:GetChildren().TeamColor = = 'Really blue' |
41 | game.Players.LocalPlayer:LoadCharacter() |
Oh and if you are going to reply don't reply to me about "IsInGroup".