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

Best way to clear a characters appearance (On Enter and On Respawn)?

Asked by
Ripull 45
10 years ago

I tried doing this but it doesn't seem to fire (ever). Thanks.

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        repeat wait() until character

        for i,v in pairs(character:GetChildren()) do
            if v:IsA("Shirt") 
                or v:IsA("Hat") 
                or v:IsA("ShirtGraphic")
                or v:IsA("Pants")
                then
                v:Destroy()
            end
        end
    end)
end)

1 answer

Log in to vote
5
Answered by
User#2 0
10 years ago

Have a look at the CanLoadCharacterAppearance property of the Player.

game.Players.PlayerAdded:connect(function(Plr)
    Plr.CanLoadCharacterAppearance = false
end)
Ad

Answer this question