How would I find the texture of a face with a script?

yes

30charrahhhhhhJHHGUFKUIRHDGHUIQRLE

Still the same error as before.

im just gonna rewrite the whole function

local is = game:GetService("InsertService")    

function ApplyFace()
    	local id = script.Parent.Text
    	local name = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent
    	local faceId = is:LoadAsset(tonumber(id)).face.Texture
    	workspace.name.Head.face.Texture = faceId
    	script.Parent.Text = "Applied"
end

image

your fault, in the original script you wrote that.

image

i don’t have the place so ill need to guess the instances

It’s correct instances, and parents. It’s just randomly giving me this error.

then add a waitforchild

30char

I’m just going to give up it’s so confusing, I’ve tried adding waitforchilds etc.

BRUH
well i guess i’m gonna do it for you then

local is = game:GetService("InsertService")    

function ApplyFace()
    	local id = script.Parent.Text
    	local name = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent
    	local faceId = is:LoadAsset(tonumber(id)).face.Texture
    	workspace:WaitForChild("name"):WaitForChild("Head"):WaitForChild("face").Texture = faceId
    	script.Parent.Text = "Applied"
end
2 Likes

What is workspace.name? Did you mean to do:

name.Head.face.Texture = faceId

Also, I have prepared a place file that can change your face texture that I hope can give some insight:
FaceChangerTest.rbxl (21.5 KB)

I used this face, entered its id into the textbox, and it successfully changed my face:

2 Likes

Then debug with printing out the instance:

print(workspace.name.Head)

If this works, then it should be fine, else you have you self to find the error, you still can watch youself in-studio-game the character of the player (your character in this case), not ask people to write full scripts and pls try with debugging, if you need help with debugging, then you can use a really, powerfull maschine, its name is just Google, i not am joking, don‘t be to lazy. If you find typos, then srry, bad englisch, but i hope you understand this

1 Like

This seemed to work, I thank you so much for helping me with your example, I also noticed the script I previously used would have worked if I actually used a face id, I accidently used a textureid to test. Oops. Sorry to everyone for wasting time.

3 Likes