Having some problems with trying to put a face texture on a character

Good Evening!
Whenever I try to put a face ID on a player in which I am customizing the texture ends up going blank, any ideas? Looked through some forums but the codes don’t seem to help me.

My current code:

Customization_Remotes.FaceEvents.FaceEvent.OnServerEvent:Connect(function(plr, id)
	local SelectedPlayer = plr.ValuesGame.SelectedPlayer.Value
local CustomizedPlayer = script.Parent.Players:FindFirstChild(SelectedPlayer)
	local faceid = id 
	 CustomizedPlayer:FindFirstChild("Head").face.Texture = "rbxassetid://"..tostring(faceid)
end)

What does the texture show up as under the properties section in studio after you click the button to change the face?

Also could check to see if your variables are returning nil or not through if & print statements

it successfully sends the id to the right player i know that i’ve tested it. Only problem is it seems to not load the face in?

Could be that you have the imageId and not the assetId. Studio will correct this on its own, but when you assign via script the game engine wont.

2 Likes

Ah, so what you said reminded me to import the face and then copy down the whole link thing the face creates when applied, so I did that and applied the whole line as the ID, which in my case was “http://www.roblox.com/asset/?id=255828374”.

Customization_Remotes.FaceEvents.FaceEvent.OnServerEvent:Connect(function(plr, id)
	local SelectedPlayer = plr.ValuesGame.SelectedPlayer.Value
local CustomizedPlayer = script.Parent.Players:FindFirstChild(SelectedPlayer)
local humanoid = CustomizedPlayer:FindFirstChild("Humanoid")
	CustomizedPlayer:WaitForChild("Head"):WaitForChild("face").Texture = id
end)

Thanks!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.