assets={}
assets.Shirt{90415298,114883953} --Shirts
assets.Pants{65160698,89224181, }
assets.Hats= game.Lighting.Hats:GetChildren() -- hats go in a model under lighting called Hats
player = game.Players.LocalPlayer -- gets the player
a = player .Character:GetChildren() -- Gets parts used for cleaning
function Clear() -- Removes hats Character meshes shirts and pants also T-shirts
for xX = 1,#a do
if a[xX].ClassName=="Hat" or a[xX].ClassName=="CharacterMesh" or a[xX].ClassName=="Shirt" or a[xX].ClassName=="Pants" or a[xX].ClassName=="ShirtGraphic" then
a[xX]:Destroy()
elseif a[xX].ClassName=="Part" and a[xX].Name~="HumanoidRootPart" then a[xX].Transparency = 0
end
end
end
Clear() -- Cleans the player
wait()
Shirt = Instance.new("Shirt",player.Character) shirts.Name = "Shirts"
pants = Instance.new("Pants",player.Character) pants.Name = "Pants"
hat = assets.Hats[math.random(1,#assets.Hats)]:Clone()
Shirt.ShirtTemplate = "rbxassetid://" .. assets.Shirt[math.random(1,#assets.Shirt)]
pants.PantsTemplate = "rbxassetid://" .. assets.Pants[math.random(1,#assets.Pants)]
hat.Parent = player.Character
This is in a Local Script inside Starter GUI but it wont work what I'm trying to do is to give clothes to the whole team players which are different to the other team. Thank You for the help

1 comment
The whole team? Or a specific person.