Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I fix team only gear appearing on all teams?

Asked by
CMB1048 25
2 years ago

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:

01Players = game:GetService('Players')
02Teams = game:GetService('Teams')
03 
04Players.PlayerAdded:Connect(function(player)
05    player.CharacterAdded:Connect(function(character)
06        print("Character is loaded..")
07 
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!")
14        else
15            shirt.Parent = character
View all 22 lines...

Answer this question