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

Why won't this remove Player's outfit???

Asked by 7 years ago

It's supposed to remove shirts, pants and hat of player! Please help.

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
    local Char = character:GetChildren()
    for i = 1, #Char do
        if Char[i].ClassName == "Accessory" or  Char[i].ClassName == "Shirt" or  Char[i].ClassName == "Pants" then
             Char[i]:Remove()
        end
    end
    end)
end)


3
This is likely running before the shirts, pants, and hats have finished loading in. Pyrondon 2089 — 7y

Answer this question