What do you want to achieve?
I want the character to close their eyes every 5 seconds.
What is the issue?
It doesn’t work…
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…
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
I made a mistake but that doesn’t change the fact that the code doesn’t work
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
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.
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
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:
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.