From 37e9f9ace1acff174d13963dfa9988b39b4f387b Mon Sep 17 00:00:00 2001 From: filoxenace Date: Sun, 5 Apr 2026 14:20:54 -0400 Subject: [PATCH] fix: support unsupported heads (hex, diamond, etc) This commit adds support for the following heads: - Hex - Diamond - Cylinder Madness - Octoblox - iBot It does it in a sort of direct way but Roblox's support for these heads is lacking so this will be the method used for now --- src/convert.luau | 26 ++++++++++++++++++++++++++ src/faceByMesh.luau | 7 +++++++ 2 files changed, 33 insertions(+) diff --git a/src/convert.luau b/src/convert.luau index 6756cb8..0f4abe2 100644 --- a/src/convert.luau +++ b/src/convert.luau @@ -7,9 +7,28 @@ local function headMeshFromHumanoidDescription(humDesc: HumanoidDescription): nu for _, bodyPartDescription in humDesc:GetChildren() do if not bodyPartDescription:IsA("BodyPartDescription") then continue end local HeadShape = bodyPartDescription.HeadShape + + -- HACK: these heads are not fully supported yet + if bodyPartDescription.AssetId == 77954380016578 then + return meshByName["Hex"] + end + if bodyPartDescription.AssetId == 123297947692270 then + return meshByName["Diamond"] + end + if bodyPartDescription.AssetId == 83797968787123 then + return meshByName["CylinderMadness"] + end + if bodyPartDescription.AssetId == 124045894066016 then + return meshByName["Octoblox"] + end + if bodyPartDescription.AssetId == 87670789201977 then + return meshByName["iBot"] + end + if HeadShape ~= "" then return meshByName[HeadShape] end + warn(`Head with ID {bodyPartDescription.AssetId} has no mesh equivalent - defaulting to classic head`) end return meshByName["RobloxClassic"] end @@ -28,9 +47,16 @@ function convert.convertCharacter(humanoid: Humanoid): () return end + humDesc.Head = targetMesh humDesc.Face = face humanoid:ApplyDescriptionResetAsync(humDesc) + -- VERY UGLY HACK: iBot head texture workaround + if targetMesh == meshByName["iBot"] then + local head: MeshPart = humanoid.Parent:FindFirstChild("Head") + head.TextureID = "rbxassetid://97292285" + end + end diff --git a/src/faceByMesh.luau b/src/faceByMesh.luau index e58c5da..f577209 100644 --- a/src/faceByMesh.luau +++ b/src/faceByMesh.luau @@ -501,6 +501,13 @@ local faceByMesh: {[number]: number} = { [13675522887] = 9156275069, [13823067122] = 9650713776, [82223146991621] = 76233968067050, + -- HACK: these heads are not fully supported yet + [123297947692270] = 144075659, + [77954380016578] = 144075659, + [124045894066016] = 144075659, + [83797968787123] = 144075659, + [2432102561] = 144075659, + [87670789201977] = 144075659 } return faceByMesh