Hi there! I have a model that is used as a morph that currently has no animations. I would like to apply the default animation every player has to my model. So when they walk, run, jump, swim, etc. I would appreciate some help if anyone knows what I need to do.
Thanks for the help but this doesnât seem to work. When I do this nothing happens. I think this is because the model is a morph (you click something and it changes playerâs model), and I do some âhackyâ code to make the morph work. This is what the morph code looks like:
function morphPlayer(player, morphName)
local model = game.ServerStorage:WaitForChild(morphName)
local morph = model:Clone()
morph.Parent = workspace
morph:MoveTo(player.Character.HumanoidRootPart.Position)
morph.Name = player.Name
player.Character = morph
local tempHumanoid = game.ServerStorage.Humanoid:Clone()
tempHumanoid.Parent = morph
tempHumanoid.Died:Connect(function()
player:LoadCharacter()
morphPlayer(player, morphName)
end)
return morph
end
You have to perfectly mimic the default r15 rig joint hierarchy. You have to make sure that each Motor6D in the default roblox rig has a direct counterpart in yours.
Go To Studio >> Test >> Play Game
When You Join The Game Go To Workspace >> Player Name And Copy The Script Called âAnimateâ And End Test Session. After That Go To Your Custom Character Model And Paste This Script. Thatâs It
Putting the âAnimateâ script in the model isnât working. I also made my model mimic the default joint hierarchy, and still no luck.
What Iâm doing right now is calling some code whenever you click a part, which morphs you into a model. As Iâve said before, this code is kind of âhackyâ and this is where I think the problem is. When I name my model âStarterCharacterâ and put it in the âStarterPlayerâ folder, the animations work. But they do not when I manually change the playerâs model through code.