Hi guys, I’m recently trying to create tutorial game for something I hav ebeen thinking for aout year and I wanted to know how can I animate both random character (NPC) and the palyer’s.
What would I say is to make very precise animations. What you probably saw in fighting animation videos (showcases) are most probably the two characters in the same model, for the user to animate them easier.
Like @octav20071 said, it is most likely a single model, in order to work around this, use your npc, and add another npc with no clothing, use LoadCharacterAppearance on the npc with no clothing or anything in order to load the appearance of the player on it, then just do your animation!
I’m not sure how I can do it could you send me example, or tutorial?
Yup Here, this pretty much explains it, also my bad, I meant GetCharacterAppearanceAsync, LoadCharacterAppearance is deprecated.
Here is the working non deprecated one!
Thank you! Also how do I combine it with the animation?
Once you load that onto the character by parenting the appearance model to the npc, just do whatever you would do to play the animations on the model!
(Group it together, only 1 humanoid!)
I will send you a sample to explain it better.
Thank you! If you need the NPC animation let me know!
Dont worry, I am just making a sample with a random animation for example. Just teaching you!
Thank you so muchhhhhhhhhh! It really help me thank you!
Alright, lets go step by step, Ill show you how to set everything.
-- Just get the player that you want (I would do this locally if you want the player to see only themselves if there is multiple people in a server) game.Players.PlayerAdded:Connect(function(player) -- use the user id in GetCharacterAppearanceAsync local CharAppearanceModel = game.Players:GetCharacterAppearanceAsync(player.UserId) -- parent it to the npc!!! CharAppearanceModel.Parent = workspace end)
When you do this, it loads the model based on the user id, when you parent it to the workspace you will find everything, but wait! It is all over the floor and in a mess with all the body parts! Easy fix! Now, you may not be able to get their body parts together that well, but we can have a set model, and parent their accessories, and shirts to it!
And so to get the accessories and their shirts, lets do this simple thing using a for loop.
-- Just get the player that you want (I would do this locally if you want the player to see only themselves if there is multiple people in a server) game.Players.PlayerAdded:Connect(function(player) -- use the user id in GetCharacterAppearanceAsync local CharAppearanceModel = game.Players:GetCharacterAppearanceAsync(player.UserId) -- parent it to the npc!!! for i, v in pairs(CharAppearanceModel:GetChildren()) do if v:IsA("Accessory") or v:IsA("Shirt") or v:IsA("Pants") then v.Parent = workspace:WaitForChild("Cutscene1"):WaitForChild("PlayerNpc") end end end)
Now as you see, it is on the character, but it is all weird! (Also, if you use r6, get a meshhead dummy, or else it will be weird).
Now this will work better if we use the original parts, so lets do that!
Now, at this point you have to decide, will your game be r6 or r15?
Once you have that we may begin the swapping process, the previous message of parenting it to the npc was to just show you. Lets do this!
As you see, it loads all the pieces, for r15, and r6.
I will show how to do this for r6, as for r15 it may take me too long.
As you see it loads everything in folders, in sorts, this makes it easier! (Kinda)
Now I think I will hold for here, I will probably continue tommorow, for now I would stick with how I parented it to the npc, once I get it all worked out, I will show you how to to get the exact model, so yeah, use a npc and parent it like in one of the previous post for now. I will see you soon with an update!