What do you want to achieve? I want to achieve a script that makes a players’ head, hair, glasses, and anything on their face/head transparent.
What is the issue? There is no issue, I just don’t know how to do it. I know how to make the players head transparent, but not the stuff on their face.
I’ve also tried a piece of code to attempt to make just the players hair transparent but it didn’t work.
one way to go about this, is to store the players clothing ID’s, then use
:ClearCharacterAppearance ( )
that will make the player a grey humanoid with default face, it will remove all clothing, accessories and body colours, so save what you want to keep, call that function and then re-apply what you wanted to keep to the character
To achieve this, we need to detect what we are looking for, in your case we are looking for Accesories. So how we do that? I like to use a loop to find accesories our player has.
for i,v in pairs(plr.Character:GetChildren()) do --This loop goes through our character
if v.IsA:"Accessory" then -- This locates our accesories in our character
print("Found an accesory")
--v:Destroy() -- use this if you want to get rid of the accesory
v.Handle.Transparency = 1
-- This section turns accesories transparent
elseif v.Name == "Head" then
v.Transparency = 1
--v.face:Destroy() -- use this if you want to get rid of the face
v.face.Transparency = 1
end
end
This will turn accesories, head and face invinsible. I didnt test the code, if you run into any problems or you have any questions let me know.
this is also a very good method of hiding the Accessories/face. id suggest going with this method as it still keeps the accessories within the player, just turns them transparent.
for _, accessory in ipairs(humanoid:GetAccessories()) do
local attachment = accessory.Handle:FindFirstChildOfClass("Attachment")
if character.Head:FindFirstChild(attachment.Name) then
accessory.Handle.LocalTransparencyModifier = 1
end
end