EDIT 05/31/2022: I’ve been receiving an increase in private messages asking if I’ve managed to find a surefire solution to this problem; I have not. I haven’t done any experimenting or delving into this topic lately. I’m still keeping an eye out for methods and am open if anyone has any advice.
I’m currently amidst an endeavour in which I wish to change a character’s model completely from standard R6/R15 rigs. I’m only accustomed to changing the appearance of a standard rig, but I want to completely rebuild the rig and have the player use it. What is a clean way I can accomplish this through?
Note that I may also need to switch back and forth between a custom character construct and a regular humanoid, possibly frequently (due to transformation abilities), so a one-off solution will not work for me.
At present, these are the methods I know of towards modifying characters:
Method 1: Parenting accessories to character or welding
Wins:
Works on standard rigs
Easy to swap and modify rigs
Allows for quick addition of new assets to character
I can craft assets using a limb as a weld reference point
Caveats:
Only really works on the rig I currently have
Doesn’t achieve my end goal
I still need to change characters frequently
Method 2: Humanoid Description System
Wins:
Really, the same as above
Caveats:
The limitations of Humanoid Descriptions
Does not work on custom rigs not adhering to an R6/R15 rig construct
Method 3: Setting Player.Character to new rig
Wins:
Achieves my result best
Rig actually changes to new model
Caveats:
Treats changes to Player.Character as respawns and fires CharacterAdded, as well as other respawn protocols (which I explicitly do not want happening but cannot void)
This includes reset of PlayerGui, inserting default scripts, so on
Not really a “clean” transformation
I’m at a loss. Character transformations are relatively vital to game play. I need to be able to morph players back and forth between certain models, or attach the models to characters and somehow have the new models behave as the character until the transformation is released (pseudo character swapping). Resolutions would be amazing.
By checking what r15 or rthro bundle he have and then checking yourself too then reloading the character with what he have to what you have, and vice-versa, also switching up their accessories, faces, and clothes.
I have no clue what you just suggested I do, nor am I sure you read my post either. Rthro falls under R15 as it is an R15 rig with different scaling and I’m not intending to use default character constructs.
Changed the post title in case it caused confusion.
People really don’t like responding to my threads, do they? This happens frequently when I post.
Does anyone have any experience with using or adding characters beyond default rigs? This is really crucial to my game’s functionality. If the methods I proposed are the only ways to change characters (which I strongly doubt is the case), how can I smoothly change between characters? I’m trying to avoid setting Player.Character (Method 3) specifically because it doesn’t have the capability to smoothly transform characters and changes to Player.Character are treated as new spawns.
Here is a side-by-side comparison of a standard rig and a custom character construct I’m looking to change to. The neon purple blocks represent the HumanoidRootPart and the red mesh on the custom character construct represents the head.
Please forgive the terrible video from my boat anchor computer.
I’m a little hesitant to jump in on this since you have way more experience with this stuff than I do, but have you considered using the R15 as a base for the custom rigs? The R15 requires a Humanoid, a HumanoidRootPart, and a Head (maybe an UpperTorso, according to the docs). The head can be swapped out and the rest can be removed, replaced, and extended as needed (with a call to BuildRigFromAttachments).
In the video I did the following:
Change from my avatar to a default Humanoid Description using ApplyDescription
Remove all the extremities (In this case I re-Parent parts of the character to replstorage)
Removed remaining character geometry and added (re-Parent) geom for my custom whateverthatis. The skeleton hierarchy for this is HumRoot->UpperTorso->UTail->MTail->LTail. After Parenting this geom to the character, I changed the UpperTorso.Joint.Part0 so it pointed to the existing HumRootPart, then used BuildRigFromAttachments.
Then I remove all the custom geometry and re-Parent the default parts back to the character (another BuildRigFromAttachments)
The rest is just normal ApplyDescription
Character:Added only fired on the initial load (char:Removing never fired) In essence, it appears that if you keep the original HumanoidRootPart and Humanoid from the R15 character you initially load, there is quite a bit of flexibility that is possible as far as customizing the rig goes if you are up for moving geometry in and out of the character and rebuilding the rig.
Anyway, maybe something to explore while we wait for someone who has this all figured out to reply.
What if you disable game.Players.CharacterAutoLoads and then set Player.Character to the new rig? I think that should prevent the CharacterAdded from firing more than once.
I find that the terms R6 and R15 are only relevant in determining the type of limbs being used. The custom character construct in the picture might as well be R65 or something, lol. The core parts (and the only ones that matter in any character construct) are the root, the head and the torso.
That being said; I never considered attempting to integrate current existing API to try and get my rig built. I’m a little hesitant since animations are ready made and hierarchy changes will screw them up. If somehow existing API can accomplish my end goal, I’d jump around joyously. Hopefully I don’t reinvent the wheel in the process.
I’ll try this out when I get back. It seems like what I want to do, though I’m not confident in how well it’ll work for my cases. For permanent character transformations, this will work. If BuildRigFromAttachments will handle the removed limbs, switching back is gold too.
I can just smell victory. I’m hoping my nose isn’t lying.
That won’t work out. CharacterAutoLoads just prevents Roblox from handling automatic character loads for you on the backend and instead empowers you to control character loading.
Changes to Player.Character are treated as respawns (character loads). LoadCharacter builds, sets up and assigns Player.Character when it’s called. CharacterAdded will fire any time a new character is added.
I might have to pursue a feature request. I don’t like the support for non-humanoid character constructs.
Ahh ok. Yea, I think you should probably request a feature if you don’t find a solution for this. I have yet to see a clean way of using custom character rigs. Currently it requires work arounds to get it to work (and it can get pretty messy from my experience).
The custom geometry you copy into the character model should bring all the relevant names and motor joints with it. As long as the base of the hierarchy that was used for the animations is called “HumanoidRootPart”, then you should be good to go. Hopefully, you should just have to update the appropriate Part[N] attrib in any motor joints that point to your custom root before calling BuildRig… so that they use the existing HumanoidRootPart in character instead.
It’s probably way simpler than models you are working with, but the weird thing with the tail in the video has an animation applied using a non-standard rig (little tail wag). It works fine since BuildRigFromAttachments creates the new skeleton in a way that matches the original (same names, orientation, pos, etc). I edited the AnimationId inside the default RunAnim object so that it used my custom animation when the thing runs. A more complete morph would require something more sophisticated. Anyway, knock on wood, there seem to be reasons for optimism.
Fingers crossed some of this gives you a path forward.
Side note: Sometimes the hip height of the humanoid needs to be reset. I haven’t worked out all the places where that’s needed, but if you see the model slide off the map then Humanoid.HipHeight == 0 may be the cause.
Animations are fine and everything. The thing is that I’m afraid the object hierarchy will get in the way when I start using those APIs. Right now, every single part that constructs the character is a child (immediate descendant) of the assembly. That’s why I’m afraid the current object hierarchy will have an impact on using any current API or produce unintended results.
Just realised I can’t use BuildRigFromAttachments without dying due to the fact that I now need to go and add attachments to literally every single part in that character. There’s already a lot of parts in it right now and no attachments. Ugh, oh boy, what fun.
There’s 98 parts; 54 UnionOperations/MeshParts and 44 regular parts.
This is part of the reason why I want to change out the entire model cleanly without triggering respawn or any terrible behaviours from the backend, which there doesn’t seem to be one from the looks of it. If you swap out the entire model itself, you get more control over everything and you don’t have to worry about the small details - just set the character and roll with it.
I’ve had success with swapping the character model without triggering a respawn by disabling the Died state and reparenting the humanoid to a storage service and stopping all animations, disemboweling the character model (destroying everything), stuffing in new guts (complete new character including scripts) without replacing the model instance, and reparenting the humanoid.
It’s possible you could preserve the old character and successfully morph them back afterwards. This requires some Science though because I haven’t done it.
This is a huge hack unfortunately. Everything nonstandard with humanoids is essentially a hack.
That’s largely unfortunate. I’ll definitely play around with this method, but it sounds agonising to deal with. It’s already a huge concern regarding the inability to backpedal from a custom character construct into a regular humanoid - I need to be able to flip between both seamlessly.
I’ll give this the solution for now and will need to pursue something in terms of a Feature Request. I would really like more support for nonstandard characters, given how prominent they’re becoming as well as the features that are being released.
The one thing that works the best here - setting Player.Character - doesn’t work out for me, because I don’t want my character changes to be treated the same way a respawn (CharacterAdded) does.