Like I’ve shown, I’ve tried to delete the Humanoid of the second character and it fixes the animations. But, it removes the accessories and Humanoid form of the second character.
I’ve also tried to remove and modify a few blocks of code that weld and interact with the second character. But, it didn’t work.
ModuleScript code that welds and changes the secondary character’s appearance.
return function(Char)
local Player = Players:GetPlayerFromCharacter(Char);
local CharTorso = Char:FindFirstChild("Torso");
if (CharTorso) then
TorsoConnect.Part0 = CharTorso;
TorsoConnect.Part1 = Torso;
end
local Settings = Replicated.GetSettings:Invoke(Player);
local SecondaryCharacterID = Settings["Secondary Character ID"];
if (typeof(SecondaryCharacterID) == "table" and typeof(SecondaryCharacterID[1]) == "number") then
ApplyDescriptionFromID(Character.Humanoid, SecondaryCharacterID[1]);
end
end
There is two ways you could address this issue but let me explain what is happening first.
I feel like when you have put these two characters together you have changed/edited the instance tree/explorer which the animation cannot understand.
You can load the animation and see what instances are located where and setup your characters like so to match or either delete the humanoid like you references and re attach the accessories through the use of Welds, Attachments, etc.
The first method wouldn’t work because removing the Humanoid wouldn’t have an affect to the character model itself. I’ve tried this with the blank rig when I didn’t load in a HumanoidDescription into the secondary character and it still failed to work with the Humanoid in the secondary character. So, trying to manage and set up the character again wouldn’t help out much.
The second method also could not work because I still need details such as the shirt and pants.
So the playback works fine I’m guessing? Is it only when you load the animation onto the rig? Wouldn’t you have to load two separate animations for each character because LoadAnimation() only applies to one humanoid and cannot control both.
I don’t have the best understanding on how animations work so someone who has more knowledge can help out on the topic though I still believe that something on Roblox’s side cannot understand the two humanoids because that is what is causing the issue.
You could take a alternate route and delete the humanoid within the rig then weld a separate character to the respective parts but at that point it feels like that’s the incorrect way and over doing it.
I’ll wait for another person to reply and hope that they have a solution. Otherwise, I’ll be forced to scrap the changeable secondary character idea and use a robot model instead.
Thank you so much for talking your time with me through this problem though!
You can create a function to weld a separate character to the prop as that’s the only solution I can think of at the time without having to re-animate but that’s all I can provide.
By two characters, you mean 2 players? I don’t have a solution for that but I have welded a character onto an npc… then built a “super rig” that animated both with the same humanoid.
It’s also possible to piecemeal animate a model, so as long as all the bones are different, you could animate the “characters” individually