As you may know, swapping packages between R15 characters is far harder than doing the same for R6. The best method I found was from the following wiki page:
If you scroll down to ‘Package Parts’, you’ll find the source code I use.
I am currently experiencing one problem; when a player ‘morphs’ into another R15 character, it will occasionally kill them. This is a big problem as I can not afford to have the player die at all.
You can test out the problem yourself here: Guest World Main Scripts - Roblox (You normally have to morph 5 or so times for it to kill you)
My question is, how can I prevent it completely from killing the player whilst changing packages?
I’ve seen that too, but my morphing system is currently based around the wiki’s method, so I’d prefer to try and solve that before scrapping it completely
The reason this kills players is because the head is temporarily disconnected from the UpperTorso. I tried setting the ‘Dead’ state to false and then disconnecting the head, and I still died by changing Part0 of the neck joint to false.
There’s more the script could be doing to make death less likely or null, but this line alone doesn’t prevent it.
You could try using BuildRigFromAttachments, but I don’t know if that would solve the issue if players dying.
Really this feels like humanoids just being annoying, once again, due to the lack of control we have over them.
If the humanoid tries to die and fails, it will just automatically die once you enable death again. Even if your configuration is complete when you enable it.
It’s basically a function for humanoids that does what the wiki example of the function does. The difference is that rather than finding all the different attachments you need to connect and running them through the function, you just run the function once after swapping out the body parts, and it finds all the attachments for you and attaches them.
Clone’s model (at least when I used it 2 months ago) has a fix in for this. It’s been talked about many times on other posts, but since this isn’t a member OP I can’t link to those posts for ForeverHD.