Help changing head type

Hi, I am trying to make it so when a player joins, they get the default head shape.

If I try to change the MeshId with this in ServerScriptService:

local Players = game:GetService("Players")

local function onCharacterAdded(character)
	local head = character:WaitForChild("Head")
	if head then
		head.MeshId = "http://www.roblox.com/asset/?id=82992952"	
	end	
end

local function onPlayerAdded(player)
	player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end

Players.PlayerAdded:Connect(onPlayerAdded)

I get this error : Unable to assign property MeshId. Script write access is restricted

So what I tried was turning MeshPartHeadsAndAccessories to disabled and changing my script to this:

local Players = game:GetService("Players")

local function onCharacterAdded(character)
	local head = character:WaitForChild("Head"):WaitForChild("Mesh")
	if head then
		head.MeshType = "Head"	
	end	
end
 
local function onPlayerAdded(player)
	player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end
 
Players.PlayerAdded:Connect(onPlayerAdded)

This gives me no errors but only changes the head from the server view.

I can’t post bug reports yet so if someone could test this out and confirm if it is a bug. All you need is the above script in ServerScriptService and change your avatar head to not the default one.

Roblox Studio have that feature! Under Home Section you will see this Cog here!
image

When you click it you will see this over here!


If not then upload the game to get access to it

Go under Avatar section and slide down where you will see These stuff

Enable it, put ID of head and hit Save button!

Glad i helped! (If i did please give me soulution :sweat_smile: )

2 Likes