How do you get the players face then put it on a starter character?

Title says everything. Please help I tried so many ways and none of them worked. Yes, I did look at other topics but they were unsolved.
Also, how would you do it in a server script so everyone can see it.

Hi there,

Give the below code a shot, see if this is what you’re trying to achieve.

-- ServerScript

local Players = game:GetService("Players")

local FaceID = 20052135

Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAppearanceLoaded:Connect(function(char)
		local humanoid = char:FindFirstChild("Humanoid")
		local description = humanoid:GetAppliedDescription()
		description.Face = FaceID
		
		humanoid:ApplyDescriptionReset(description)
	end)
end)

EDIT: I may have misread your original post, I apologize. By “putting it on a starter character”, what exactly are you referring to? Regardless, you can still use HumanoidDescription’s Face property to get a player’s face and further process it in your code.

2 Likes

like, get the players face from their avatar then put the texture id on the startercharacter face decal texture id

I have done it for one of my games, so i can send u the script but tomorrow.

ServerScript in StarterCharacterScripts:

local Players = game:GetService("Players")
local plr = game.Players:WaitForChild(script.Parent.Name)

local model = game.ReplicatedStorage.Characters:FindFirstChild("Bacon") -- your starterCharacter (With no face)
print("Model from server is", model)

local oldModel = script.Parent
local newModel = model:Clone()
newModel.Name = oldModel.Name

local face = oldModel:WaitForChild("Head"):WaitForChild("face"):Clone()
face.Parent = newModel:WaitForChild("Head")


local oldCFrame = game.Workspace.Spawn -- your spawn part

plr.Character = newModel
newModel.Parent = workspace -- [1] this follows current character loading behavior
newModel:SetPrimaryPartCFrame(oldCFrame)

oldModel:Destroy()

Tested, works.
I hope I helped :slight_smile:

Oh sorry @ZEDDxR I didn’t see your reply.

1 Like

Ah, I understand.

I’ve just put together this piece of code which (hopefully) achieves what you’re trying to.

Although untested, this approach simply involves loading in the player’s original character, grabbing the face decal instance directly from it and parenting it to the specific StarterCharacter. Fairly straightforward.

Give it a shot:

-- ServerScript

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		task.wait(0.1) -- A minor yield since HasAppearanceLoaded or CharacterAppearanceLoaded return false-positives with StarterCharacter
		local originalChar = Players:CreateHumanoidModelFromUserId(plr.UserId)
		
		if originalChar then
			local face = originalChar.Head:FindFirstChildOfClass("Decal")

			if face then
				local starterFace = char.Head:FindFirstChildOfClass("Decal")

				if starterFace then
					starterFace:Destroy()
				end
				
				face.Parent = char.Head
				originalChar = nil
			end
		end
	end)
end)

Let me know if you run into any issues. Good luck.

2 Likes