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

Why does the character's appearance not clear?

Asked by 5 years ago

I'm trying to clear the players appearance but nothing happens?

    Player.CharacterAdded:Wait()
    if game:GetService("Players"):FindFirstChild(Player.Name) and Player.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 and Player.Character.Humanoid.Health > 0 then
        Player:ClearCharacterAppearance()
        print("Player cleared")
    end

I'm using function onPlayerEntered(Player) to find out who the player is. since I'm trying to clear the appearance on join

0
Can you post the entire script? Also, does "Player cleared" print in the output? laughablehaha 494 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

I guess you'll have to do it manually:

game.Players.PlayerAdded:Connect(function(Player)
    local Character = Player.Character or Player.CharacterAdded:Wait()
    for _, Object in pairs(Character:GetDescendants()) do
        if Object:IsA("Accoutrement") or Object:IsA("Shirt") or Object:IsA("Pants") or Object:IsA("CharacterMesh") or Object:IsA("BodyColors") or Object:IsA("ShirtGraphic") or (Object:IsA("Decal") and Object.Parent.Name == "Torso") then
            Object:Destroy()
        end
    end
end)

This does not remove R15 packages. You can go into game settings and disable R15 packages in the Avatar section manually. This also does not clear faces.

If this helped, upvote/accept it! Thanks!

Ad

Answer this question