I am using ChildAdded, and iterating through the descendants of the character to find every base part and decal, and make them transparent. The code below works for EVERYTHING, but the face decal on the head.
Literally no matter what I do, the face does not get deleted. I have absolutely no idea what the hell is going on. PLEASE HELP!
ChildAddedConnection = Character.ChildAdded:Connect(function(Object)
if Object:IsA("BasePart") then
Object.Transparency = 1
if Object.Name == "Head" then
local Connection
Connection = Object.ChildAdded:Connect(function(HeadChild)
if HeadChild:IsA("Decal") then
print(HeadChild)
HeadChild:Destroy()
Connection:Disconnect()
Connection = nil
end
end)
end
elseif Object:IsA("Accessory") then
Object:WaitForChild("Handle"):Destroy()
end
end)
--// Backup function to catch descendants that were not set to be invisible.
local Descendants = Character:GetDescendants()
for _, Object in pairs (Descendants) do
if Object:IsA("BasePart") then
Object.Transparency = 1
elseif Object:IsA("Decal") then
print(Object)
Object.Parent = nil
print(Object.Parent)
elseif Object:IsA("Accessory") then
Object:WaitForChild("Handle"):Destroy()
end
end