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 ?
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)
Closed as Not Constructive by User#19524
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?