Help on Getting rid of the Characters face

Can someone take a look at my code n see what i’ve done wrong? im trying to rid of the Characters face?

This is my code :slightly_smiling_face:
let me know what i’ve done wrong.

    local v = player.Character.Head:GetDescendants()
    for index, v in pairs(v) do
		if v:IsA("Texture") then
			v.Face:Destory()
		end
	end

Very close to working! That said, maybe you could optimize your code a little bit. You don’t need to get the descendants of the head, only the children via GetChildren().

The face is a “Decal” class, not a “Texture.” You can verify this via the properties widget. If you change the IsA(“Texture”) to IsA(“Decal”) it should work.

1 Like

Yup! One last small thing, when you get index/value pairs, the value is the literal object. You don’t need to do v.face. All you have to do is v:Destroy(), as the v is any decal that is on the player’s head.

1 Like

yeah my bad lol it was just really irritating on trying to just remove the face idk why i did
v:IsA(“Texture”) should of done Decal im sorry for wasting your time but thanks for the help! :heart:

Nah no worries, glad to have helped! Some of the class names are super vague so it totally makes sense. If you’d ever want to optimize this code further in the future feel free to ask! There’s a few ways one could do this.

1 Like

For now im just gonna leave the code how it is then later on in the future i might just optimize it but i apprecaite you helping me out today :slightly_smiling_face: what a life saver

1 Like