Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a auto-assign clothes? [closed]

Asked by
D3VRO 66
5 years ago

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 ?

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?

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago
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)
0
don't forget to remove t-shirts hellmatic 1523 — 5y
0
Thanks! MythicalShade 420 — 5y
Ad