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.