Below is my current code and it works however, not for the accessories they are still visible. Can someone help me include the accessories-all mesh parts?
Thank You in advance
function setTransparency(char, value)
for _, child in pairs(char:GetChildren()) do
if child:IsA('Hat') and child:FindFirstChild("Handle") then
child = child.Handle
elseif child:IsA('BasePart') then
child.Transparency = value
end
end
end
local enabled = true
workspace.TransPart.Touched:connect(function(hit)
local char = hit.Parent
if char then
local head = char:FindFirstChild("Head")
local face = head:FindFirstChild("face")
if enabled and head and game.Players:GetPlayerFromCharacter(char) then
enabled = false
for t = 0, 1, .1 do
if face then face.Transparency = t end
setTransparency(char, t)
wait(0.1)
end
wait(10)
for t = 1, 0, -.1 do
if face then face.Transparency = t end
setTransparency(char, t)
wait(0.1)
end
wait(2)
enabled = true
end
end
end

3 comments
By accessories, I think he means stuff like hats and hair
Yes, to Dr_Smartypants. The characters currently turn invisible but, only face, head and body...not their accessories such as hats, capes, pauldrons..etc. I need help including accessories and mesh parts.
Your code is gonna be a loonggg code lol