How do I make a Team door for my infection game?
Asked by
4 years ago Edited 4 years ago
I wanna make a team only door
like so if someone walks up to the door it makes the other team cant go at the same time has him
also can you fix the script
01 | local AlloweedColor = "Really Blue" |
02 | local DeniedColor = "Lime green" |
03 | script.Parent.Touched:Connect( function (hit) |
04 | local player = game.Players:GetPlayerFromCharacter(hit.Parent) |
05 | if player.TeamColor = = AlloweedColor then |
06 | script.Parent.Transparency = 1 |
07 | script.Parent.CanCollide = false |
08 | elseif player.TeamColor = = DeniedColor then |
09 | hit.Parent.Humanoid.Health = 0 |