Strange Behavior HumanoidDescription with custom heads

I am having an issue with humanoid descriptions, where… if a player has a custom head (such as Roblox woman head) and I apply a humanoiddescription with a head value of 0 (meaning default Roblox head) my custom flight and swim scripts (consisting of a local script with a child module) stop working. This also happens if I have a default head 0, but apply a humanoiddescription with a custom head.

My scripts only seem to NOT get messed up when the applied head is the same as the head already being used (so I assume it is simply not replacing the head) This is odd considering I have no scripts or anything in the head, all my scripts are parented the the Character object.

So is there something I need to do? Such as recreate scripts or re-require modules when changing heads? Is this an issue related to the heads going to be mesh parts soon?

Any info or advice will help, thanks.

I found the solution.
Apparently when body parts are changed they will become a new instance, and so any references in the script will be nil.

This is why my script was failing, the loop it runs has a CheckAlive function that checks for Torso and Head (Torso being HumanoidRootPart) HumanoidRootPart is not modified by the HumanoidDescription, but it does change the head.

So… 3 days later, and I am a bit wiser about setting references to things that might change instances. :slight_smile:

4 Likes