How can i make a face changer?

  1. What do you want to achieve? Keep it simple and clear!
    I want to be able to make a scrolling frame gui and when you click an image button, then your face is changed on the server side.

  2. What is the issue? Include screenshots / videos if possible!
    I tried making one, but it didn’t’ work for some reason, i did everything correctly.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have tried YT and Devforum

1 Like

Show the code so people can see what went wrong

2 Likes

I showed the code in the post before this and the code was perfect, nothing was wrong with it, and people couldn’t figure out what was wrong

1 Like

Ok i saw your code and here’s an idea:

Instead of changing the Id of the Face Decal, create a Decal with the Id of the face that you want, and check if it is working properly.

If your NewFace decal is ready, put it somewhere where it can be cloned, like a folder in replicated storage.

here’s an example of the code

-- On client:
for i,v in pairs(script.Parent:GetDescendants()) do

	if v:IsA("ImageButton") then

		v.MouseButton1Click:Connect(function()

		 -- Instead of getting the Id, get the name of the decal that you are gonna clone
			local DecalName = v.Name
			game.ReplicatedStorage.ChangeFace:FireServer(DecalName)

		end)

	end

end

-- On Server:

game.ReplicatedStorage.ChangeFace.OnServerEvent:Connect(function(Player, DecalName)
	-- Folder with all the faces you want
	local FacesFolder = game.ReplicatedStorage.FacesFolder
	-- Finds the Decal with the name the client asked for and clones it
	local NewDecal = FacesFolder:FindFirstChild(DecalName):Clone()

	local Character = Player.Character

	if Character then
		-- Makes the default face invisible
		Character.Head.face.Transparency = 1
		-- Put the Face you want on the Head
		NewDecal.Parent = Character.Head		

	end

end)

-- When you want the face to go back, Delete the other Decal and set face.Transparency to 0

2 Likes

it still doesn’t work, I tried it

1 Like

I’ve sorta figured it out, I think roblox changed something with faces, because if you play the game and change the face id, it wont work, but if you click on the head and go into it and find mesh, theres a texture ID and if you remove it, your face goes blank, so i tried putting my id there but the face went all wonky and in weird places

1 Like

Hello, I’m very late, but it seems like the new 3D Roblox faces create this issue for you. You need to replace any mesh that the head uses with a “Head” type mesh and change the size to the normal one, then just apply the face decal.

2 Likes

Yea, i’ve figured that out today, i never knew about it when i made this post

2 Likes