How to use ReplaceBodyPartR15() with head

Does anyone know how to use:

workspace.NewFissy.Humanoid:ReplaceBodyPartR15(Enum.BodyPartR15.Head, workspace.Head)

with a head?

When I use insert service to insert the head by ID, it inserts a SpecialMesh, not a part:
image

Is there a roblox-provided method that will convert this mesh into the correct head format, which should include the part, the neck joint, and all attachments? Thanks!

5 Likes

It doesn’t seem like ReplaceBodyPartR15 was ever enabled? Am I wrong?

Those patch notes must not have been updated because ReplaceBodyPartR15 is working for me for other limbs

2 Likes

My Load Character plugin uses it.

Shameless plug(-in)

Shameless pun

1 Like

Do you manually reconstruct the head part, all attachments and the neck joint from the mesh you get from insert service? Or do you use some roblox provided method?

1 Like

I simply use ReplaceBodyPartR15(), exactly like you do here

Do you call it on the mesh that insertservice gives you, since it doesn’t give you a part?

Can you give me the id of the asset that provided only a mesh?

Here’s one: 2608540431 (Magma Fiend Head)
This ID/asset is from the Bundle Magma Fiend

1 Like

I installed your plugin:
RobloxStudioBeta_2018-12-15_19-06-50

Checked the source:


RobloxStudioBeta_2018-12-15_19-09-34

And it appears that the head has separate logic from the other body parts and doesn’t use ReplaceBodyPartR15. It seems to just replace the mesh.

However this technique seems to result in incorrect sizing:

Simple replacement of mesh:
RobloxStudioBeta_2018-12-15_19-12-25

What it should look like:
image

1 Like

Ohhh yeah. You have to parent the HeadScale to the Humanoid for it to scale properly. I totally forgot that I used different logic for the head.

2 Likes

Figured it out through some trial and error:

You have to leave these things parented to the mesh:

Then copy an existing head, replace the mesh. You can’t delete the Neck or attachments from your cloned head otherwise it’ll kill the humanoid when you use ReplaceBodyPartR15().

Lastly, use ReplaceBodyPartR15() on the cloned head. Roblox’s engine will automatically update the neck and attachments to the values parented within the mesh

9 Likes