How would I change a players face as soon as their character loads into the game? Lets say a face like this for example:
2 Likes
Wouldn’t this be possible by altering the decal on the Character.Head
? Example here,
local assetId = " " -- your faceid
game.Players.PlayerAdded:Connect(function(plr)
local Character = plr.Character or plr:CharacterAdded:Wait()
local head = Character:WaitForChild("Head")
local FaceDecal = head:FindFirstChildOfClass("Decal")
if FaceDecal then
FaceDecal["Texture"] = ("http://www.roblox.com/asset/?id="..assetid)
end
end)
or if you’re supposed to do it locally (I don’t remember)
local assetId = " " -- your faceid
local Player = game.Players.LocalPlayer
local Character = plr.Character or plr:CharacterAdded:Wait()
local head = Character:WaitForChild("Head")
local FaceDecal = head:FindFirstChildOfClass("Decal")
if FaceDecal then
FaceDecal["Texture"] = ("http://www.roblox.com/asset/?id="..assetid)
end
Well for this you will want to add the face to the players each time they spawn:
local faceId = "" -- paste the face ID in the speak marks
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char) -- each time the character loads this will run
local head = char:WaitForChild("Head") -- we wait for the head to load
local face = Instance.new("Decal")
face.Id = faceId
face.Name = "face"
face.Parent = head
end
end
1 Like
Isnt there an option in settings called starterface on avatar?
No. That would be quite funny if there was.
No I think you are getting confused with StarterCharacter
When a character fully loads a child of Humanoid is HumanoidDescription you can edit the ID on there and then do Humanoid:ApplyDescription(HumanoidDescription) on a server script
game:GetService("Players").PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Char)
repeat wait() until Char:FindFirstChildsWhichIsA("Humanoid");
local Humanoid = Char:FindFirstChildsWhichIsA("Humanoid");
local HumDesc = Humanoid:FindFirstChildsWhichIsA("HumanoidDescription");
HumDesc.Face = 6708467713; -- Might have to be a rbxassetid not sure
Humanoid:ApplyDescription(HumDesc);
end)
end)
2 Likes