my body parts do but when i become invisible all i see if my beard, hair etc. how do i fix that?
function setTransparency(char, value) for _, child in pairs(char:GetChildren()) do if child:IsA('Hat') and child:IsA("Accessory") and child:FindFirstChild("Handle") then child = child.Handle elseif child:IsA("BasePart") and child.Name ~= "HumanoidRootPart" then child.Transparency = value end end end local enabled = true game.Workspace.inva.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)
local selectedTransparency game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(chr) delay(.5, function() --// Function delay to make sure the character has been added. if chr then for _,parts in pairs(chr:GetChildren()) do wait() if parts:IsA("BasePart") or parts:IsA("Part") or parts:IsA("MeshPart") or parts:IsA("GuiBase3d") or parts:IsA("Decal") then selectedTransparency = 1 parts.Transparency = selectedTransparency wait() else if parts:IsA("Accessory") then --// Ghost Mode parts:Remove() --// Don't have to add this. end end for _,parts_2 in pairs(parts:GetChildren()) do if parts_2:IsA("Decal") then parts_2.Transparency = 1 --// Will remove the face end end end end end) end) end)