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

How to remove a face in a customized character?

Asked by 6 years ago
Edited 6 years ago

So i made a customized character which has such a script (Only head because thats the problem) :

--// Head 
  local ClonedH = Head:Clone() 
  ClonedH.Parent = char

  ClonedH.Main.CFrame = char:WaitForChild('Head').CFrame 

  local Weld = Instance.new('ManualWeld') 
  Weld.Part0 = ClonedH.Main  
  Weld.Part1 = char:WaitForChild('Head') 
  Weld.C0 = ClonedH.Main.CFrame:Inverse() * char:WaitForChild('Head').CFrame  
  Weld.Parent = char:WaitForChild('Head') 


, and i used this script to remove the face :

local Players = game:GetService("Players");




function removeFace (character)
        local head = character:WaitForChild("Head")
        if not head then return false end

        for num, obj in pairs(head:GetChildren()) do
        if obj:IsA("Decal") then
            obj:Destroy()
        end
        end
    end

    Players.PlayerAdded:Connect(function(player)
        player.CharacterAppearanceLoaded:Connect(function(character)
            removeFace(character);
        end)
    end)

but it doesnt remove actually the face when i start the game in studio :C, what is the error?. I dont get anything in output

0
Reformat your code inside of the code block. It's hard to read as it is. The code goes in between the two squiggly lines you insert when clicking the blue Lua icon. xPolarium 1388 — 6y
0
done BuilderMfriend1 -5 — 6y
0
use CharacterAdded not CharacterAppearanceLoaded User#22604 1 — 6y
0
Do not use CharacterAdded instead. There is a reason why I added CharacterAppearanceLoaded and not CharacterAdded. CharacterAdded fires as soon as the character has been added while the CharacterAppearanceLoaded fires once everything in the character has been loaded (shirt, pants, face etc.) He asked this question yesterday as well where I gave him the removeFace code. 1TheNoobestNoob 717 — 6y

Answer this question