How to set the transparancy of a face?

  1. What do you want to achieve?
    I want the character to close their eyes every 5 seconds.
  2. What is the issue?
    It doesn’t work…
  3. What solutions have you tried so far?
    I have tried to set the transparancy of the face of the character.
local Character = game.Players.LocalPlayer.Character
local Head = Character:WaitForChild("Head")
local Eyes = Head:WaitForChild("Eyes")
local ClosedEyes = Head:WaitForChild("ClosedEyes")

while true do
	Eyes.Face.Transparency = 0
	ClosedEyes.Face.Transparancy = 1
	wait(5)
	Eyes.Face.Transparency = 1
	ClosedEyes.Face.Transparancy = 0
	wait(5)
end

I have placed this code in StarterCharacterScript.
Sorry for my bad english…

try this

local Character = game.Players.LocalPlayer.Character
local Head = Character:WaitForChild("Head")
local Eyes = Head:WaitForChild("Eyes")
local ClosedEyes = Head:WaitForChild("ClosedEyes")

while true do
	Eyes.Transparency = 0
	ClosedEyes.Transparancy = 1
	wait(5)
	Eyes.Transparency = 1
	ClosedEyes.Transparancy = 0
	wait(5)
end
3 Likes

It doesn’t work but thanks for the reply :wink:

I made a mistake but that doesn’t change the fact that the code doesn’t work :neutral_face:

local Character = game.Players.LocalPlayer.Character
local Head = Character:WaitForChild("Head")
local Eyes = Head:WaitForChild("Eyes")
local ClosedEyes = Head:WaitForChild("ClosedEyes")

while true do
	Eyes.Transparency = 0
	ClosedEyes.Transparancy = 1
	wait(5)
	Eyes.Transparency = 1
	ClosedEyes.Transparancy = 0
	wait(0.5)
end

I have remove wait(5) by wait(0.5)

There’s an issue with humanoid faces not going transparent. It has been going on for a long long time. In fact, in some moon animator tutorials, I’ve seen people animate faces using another head mesh (outside of the humanoid model). And they animate the head mesh along with the head (in the humanoid character).

If you put the same image in a separate part/head mesh/whatever it will change it’s transparency, according your setting.

1 Like

That’s what I have in the head of the character :
CaptureDevForum

I assume my code is wrong ? :thinking:
I don’t know …

I do that but it doesn’t work either…

local Character = game.Players.LocalPlayer.Character
local Head = Character.Head
local Eyes = Head.Eyes
local ClosedEyes = Head.ClosedEyes

while true do
	Eyes.Transparency = 0
	ClosedEyes.Transparancy = 1
	wait(5)
	Eyes.Transparency = 1
	ClosedEyes.Transparancy = 0
	wait(1)
end

Shouldn’t this be game.workspace.“playername”? (or any other way to access the player, i am bad at scripting.)
Screenshot_1
The directionairy (i dont know how to spell it) shows only this.

1 Like

I do not think so, because I’ve always done it that way and it always worked. :thinking:


Well, the head and decals are found in workspace, so I think its related.

1 Like

I have a starter character, and it’s placed not in the workspace is placed the StarterPlayer :neutral_face:


The startercharacter still shows up in the workspace folder.

1 Like

You misspelled “Transparency”, it’s written as “Transparancy” in your code.
EDIT: You should also remove the '.Face’s

2 Likes

Oh yeah, ClosedEyes is spelled like Transparancy. Didn’t even notice.

2 Likes

thank you so much it does work !!! :grin:

1 Like

The face comes from an attachment, shown here:

1 Like

Thank you for the help ! :wink:
have a good day ! :smile:

2 Likes

It can’t come from an attachment as it will not show because attachments don’t really have any actual model, they have to be parented to the Head (or any other basepart), like this:

image

1 Like

I was thinking the attachments were attached to a model. But I don’t really know considering we didn’t see the entire character, anyways. The issue is solved so yeah nothing else to worry about.

2 Likes