I am making a way for teams to have their own uniform and hats but right now it is currently semi working as it loads in the accessorys but not the shirts and pants thus making them naked.
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
if player.Team == game.Teams.SRBR then
wait(1)
player.Character.Humanoid:RemoveAccessories()
wait(1.5)
local HatCloned = EBRTHELMET:Clone()
HatCloned.Parent = character
character:WaitForChild("Shirt").ShirtTemplate = "rbxassetid://5881185588"
character:WaitForChild("Pants").PantsTemplate = "rbxassetid://5881193066"
player.Character.Humanoid:AddAccessory(EBRTVEST)
end
end)
end)
local InsertService = game:GetService("InsertService")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
if player.Team == game.Teams.SRBR then
wait()
local Hum = character:WaitForChild("Humanoid")
Hum:RemoveAccessories()
local HatCloned = EBRTHELMET:Clone()
HatCloned.Parent = character
local oldShirt = character:WaitForChild("Shirt")
local oldPants = character:WaitForChild("Pants")
oldPants:Destroy()
oldShirt:Destroy()
pcall(function()
local modelShirt = InsertService:LoadAsset(5881185588)
local modelPants = InsertService:LoadAsset(5881193066)
local Shirt = modelShirt:WaitForChild("Shirt")
local Pants = modelPants:WaitForChild("Pants")
Shirt:Clone().Parent = character
Pants:Clone().Parent = character
modelPants:Destroy()
modelShirt:Destroy()
end)
Hum:AddAccessory(EBRTVEST)
end
end)
end)