Hey everyone! Thanks in advance for your time in looking through this question.
I am not sure if I asked this question correctly. Let me explain it a little bit better here.
I am creating a character selection system where players get to choose a new character to play when they die. This is how the sequence plays out in my mind.
1/ Player Dies
2/ Character Selection GUI pops up.
3/ Player makes selection
4/ Player spawns as new character.
The character that is available for selection can be humanoid or a monster. This means that I cannot load a character using HumanoidDescription, because their Rig will be different. I also cannot rely on StarterCharacter since, it doesn’t allow me to have multiple models in there.
At the moment. I can change to characters that have HumanoidDescription when the character is added. I can also change their appearance on the fly. But I am totally stumped on how to attached a custom model that is not a humanoid as playable character.
I also attempted to Destroy the current character and parent it with a new model.
And then add the new model to the workspace.
The below code is what I have tried. This works, but the camera no long moves along with the character. If I can get the camera system to go with it. I think that will hopefully solve my problem.
player.CharacterAdded:Connect( function( char )
char:WaitForChild( "Humanoid" ).Died:Connect( function( )
local newModel = workspace.LadySpawn:Clone( );
newModel.Parent = game.Workspace;
newModel.HumanoidRootPart:SetNetworkOwner( player )
player.Character = newModel;
char:Destroy( )
end)
end)
Here is an example of a video I capture.
I hope that I am making some sense here. Any help would be appreciated.
UPDATE: I think have solve this issue. I found a thread here that shows the sequence on how to load he character properly.