How to make certain clothes equipped for certain teams?

Hello developers! I’m making a game with 2 teams. I wanted to make it so blue team has a a set of clothes and red team has a different set of clothes. The only thing I could find was the avatar restrictions Game Settings, but it defaults it for everyone, not certain players.

I know this is possible because Arsenal managed to do this.

Any ideas on how I could do this?

use HumanoidDescription, get the player’s humanoid description and then just edit the shirt property, and then re apply that description to them. you can change their clothes if they are on a specific team

1 Like

There is an article on HumanoidDescription right?

Yes, just search “HumanoidDescription”.
https://developer.roblox.com/en-us/articles/humanoiddescription-system

1 Like

yes, also here’s a sample code of what i’m talking about

local function changeTeamClothes(character)
    local humanoid = character:FindFirstChildOfClass("Humanoid")
    if not humanoid then
        return
    end
    local description = humanoid:GetAppliedDescription()
    description.Shirt = 0000 -- id
    description.Pants = 0000 -- id
    humanoid:ApplyDescription(description)
end
1 Like

Thank you so much! I will figure it out from there.

1 Like
local players = game:GetService("Players")
local storage = game:GetService("ReplicatedStorage")
local redShirt = storage:WaitForChild("RedShirt")
local blueShirt = storage:WaitForChild("BlueShirt")
local redPants = storage:WaitForChild("RedPants")
local bluePants = storage:WaitForChild("BluePants")

players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		player.CharacterAppearanceLoaded:Connect(function(character)
			if character:FindFirstChild("Shirt") then
				character:FindFirstChild("Shirt"):Destroy()
				if player.Team.Name == "Red" then
					local redShirtClone = redShirt:Clone()
					redShirtClone.Parent = character
				elseif player.Team.Name == "Blue" then
					local blueShirtClone = blueShirt:Clone()
					blueShirtClone.Parent = character
				end
			else
				if player.Team.Name == "Red" then
					local redShirtClone = redShirt:Clone()
					redShirtClone.Parent = character
				elseif player.Team.Name == "Blue" then
					local blueShirtClone = blueShirt:Clone()
					blueShirtClone.Parent = character
				end
			end
			if character:FindFirstChild("Pants") then
				character:FindFirstChild("Pants"):Destroy()
				if player.Team.Name == "Red" then
					local redPantsClone = redPants:Clone()
					redPantsClone.Parent = character
				elseif player.Team.Name == "Blue" then
					local bluePantsClone = bluePants:Clone()
					bluePantsClone.Parent = character
				end
			else
				if player.Team.Name == "Red" then
					local redPantsClone = redPants:Clone()
					redPantsClone.Parent = character
				elseif player.Team.Name == "Blue" then
					local bluePantsClone = bluePants:Clone()
					bluePantsClone.Parent = character
				end
			end
			if character:FindFirstChild("Shirt Graphic") then
				character:FindFirstChild("Shirt Graphic"):Destroy()
			end
		end)
	end)
end)

This should be simple enough to understand how it works.

Wow. You read my mind on what I was going to do in my game. Thanks man!