How can I change a Players shirt and pant depending on what team they are on

How can I change a Players shirt and pant depending on what team they are on.

You can try this code:

if plr.Team == "team" then
     plr:LoadCharacter()
     if plr.Character:FindFirstChildOfClass("Pants") then plr.Charater:FindFirstChildOfClass("Pants"):Destroy()
end
      if plr.Character:FindFirstChildOfClass("Shirt") then plr.Charater:FindFirstChildOfClass("Shirt"):Destroy()
end
     local newShirt = Instance.new("Shirt",plr.Character)
     local newPants = Instance.new("Pants",plr.Character)
     newShirt.ShirtTemplate = "rbxassetid://id"
     newPants.PantsTemplate = "rbxassetid://id"
end

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.