Update Face Texture

Hello, I would like to know why the face is not updated?

https://gyazo.com/65a98d72d68f96c49dea081a363b01fc

local rs = game:GetService("ReplicatedStorage")
local serverStorage = game:GetService("ServerStorage")

rs.Events.Deploy.DeployPHANTOM.OnServerEvent:Connect(function(plr)
	local char = plr.Character
	for i, part in ipairs(char:GetChildren()) do 
		if part:IsA("Accessory") or part:IsA("Pants") or part:IsA("Shirt") then
			part:Destroy()
		end
	end
	
	char.Head:FindFirstChildOfClass("Decal").Texture = "rbxassetid://"..serverStorage.Accessories.PHANTOM.FaceID.Value 
	local pant = serverStorage.Accessories.PHANTOM.Pants:Clone()
	pant.Parent = char
	
	local shirt = serverStorage.Accessories.PHANTOM.Shirt:Clone()
	shirt.Parent = char
 end)
3 Likes

Looks like you got a 3D Face therefore it overrides the images.

2 Likes

Ah and how I do then to have my custom face?

2 Likes

You can take it off your avatar on the roblox website or add a script which disables it for every player once they join.

1 Like

Yeah but I mean script side, so how I disable it for every player once they join?

1 Like

You can try pressing the StarterPlayer instance, then in the character tab, change enabledynamic heads from default to disabled.

Source: Remove Face Controls on a Character?

1 Like

Uh I tried the code of someone in your source and nothing is happening :

local rs = game:GetService("ReplicatedStorage")
local serverStorage = game:GetService("ServerStorage")

rs.Events.Deploy.DeployPHANTOM.OnServerEvent:Connect(function(plr)
	local char = plr.Character
	for i, part in ipairs(char:GetChildren()) do 
		if part:IsA("Accessory") or part:IsA("Pants") or part:IsA("Shirt") then
			part:Destroy()
		end
	end
	
	local mesh : SpecialMesh = char.Head:FindFirstChild("Mesh")
	if mesh then 
		if mesh.Scale.Magnitude <= Vector3.one.Magnitude then
			mesh:Destroy()
			mesh = Instance.new("SpecialMesh")
			mesh.Name = "fixed mesh"
			mesh.Scale = Vector3.one*1.25
			mesh.MeshType = Enum.MeshType.Head
			mesh.Parent = char.Head
		end
	end
	 
	local pant = serverStorage.Accessories.PHANTOM.Pants:Clone()
	pant.Parent = char
	
	local shirt = serverStorage.Accessories.PHANTOM.Shirt:Clone()
	shirt.Parent = char
	
	local glasses = serverStorage.Accessories.PHANTOM.Glasses:Clone()
	local gilet = serverStorage.Accessories.PHANTOM.Gilet:Clone()
	glasses.Parent = char 
	gilet.Parent = char 
 end)
1 Like

try this

	local mesh = char.Head:FindFirstChildWhichIsA("SpecialMesh")
	if mesh then 
		mesh.Scale = Vector.new(1.25,1.25,1.25)
		mesh.MeshType = Enum.MeshType.Head
	end

Alright I tried and … still the same face :frowning:

image

Doesn’t look 3d anymore, can you take a look at the properties of the SpecialMesh and tell me if the MeshType is a Enum.MeshType.Head?

Note: Checked your avatar and you have the normal “:]” Face equipped as well

FileMesh

image
WAIT IT WORKS !

Awesome! Also as a suggestion, make sure that you run your code on the server and not the client unless it’s a singleplayer game since otherwise other players will appear uniform-less for you.

Wait what? I did not understand, I use a remote event (from client to server), I don’t know if it was that your question.

Oh yea I just realized you we’re doing .OnServerEvent, my bad.

1 Like

Alright don’t worry :), thank you again.

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