I'm making a script where a player turns invisible when they activate a tool. I am able to make their BaseParts invisible (arms, legs torso.. etc), but their hats/glasses stay on.
for i, v in pairs (kinder) do local transparent = 1 if v:IsA("BasePart") or v:IsA("Accessory")then v.Transparency = transparent end end
kinder is a table of the character's children.
In this code, the error message is: Transparency is not a valid member of Accessory.
Is there any way to make the player fully invisible, including accessories?
for _, player in pairs(game.Players:GetPlayers()) do local character = player.Character for _, descendant in pairs(character:GetDescendants()) do if descendant:IsA("BasePart") then descendant.Transparency = 1 end end end