Does anyone know how to script an auto-assign clothes, so when players join a game, it automatically makes them wear a certain type of clothing ?
COMMUNITY QUESTION
How to make a auto-assign clothes?
1 answer
game:GetService('Players').PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(character)
character.Humanoid.MaxHealth = math.huge
character.Humanoid.Health = math.huge
local ShirtID = 0
local PantsID = 0
local shirt = character:WaitForChild('Shirt',5)
local pants = character:WaitForChild('Pants',5)
if character["Shirt Graphic"] then
character["Shirt Graphic"]:Destroy()
end
if not shirt then
local shirt = Instance.new('Shirt',character)
shirt.ShirtTemplate = "rbxassetid://"..ShirtID
elseif not pants then
local pants = Instance.new('Pants',character)
pants.PantsTemplate = "rbxassetid://"..PantsID
end
shirt.ShirtTemplate = "rbxassetid://"..ShirtID
pants.PantsTemplate = "rbxassetid://"..PantsID
end)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
don't forget to remove t-shirts
Thanks!