How do I fix team only gear appearing on all teams?
So basically, I am trying to make Avatar: The Way of the Water into a border game. I have tried making a team only shirt, pants, and hat script but it appears on all other teams too! How do I fix this?
Code:
01 | Players = game:GetService( 'Players' ) |
02 | Teams = game:GetService( 'Teams' ) |
04 | Players.PlayerAdded:Connect( function (player) |
05 | player.CharacterAdded:Connect( function (character) |
06 | print ( "Character is loaded.." ) |
08 | local team = player.Team |
09 | local shirt = team.Shirt:Clone() |
10 | local pants = team.Pants:Clone() |
11 | local Mask = team.Mask:Clone() |
12 | if not player.Team:FindFirstChild( "Shirt" ) then |
13 | print ( "No clothing in this team!" ) |
15 | shirt.Parent = character |
16 | pants.Parent = character |
17 | Mask.Parent = character |