Why does my pet animation not play?

I am wanting to make my dragon play a animation.
In a script my dragon is welded to a hitbox part that is connected to a alignposition and alignorientation. It doesn’t decide to move and not play the animation of the baby dragon. When I put the humanoid, motor6Ds and animation.

There is no errors it prints that its playing but nothing is happening

this is the build of it

and the script:

	-- sets the position of the hitbox of the dragon to the HumanoidRootPart
	Dragon:SetPrimaryPartCFrame(HumanoidRootPart.CFrame)

	-- creating the attachments to connect the alignposition and alignorientation

	local CharacterAttachA1 = Instance.new("Attachment",HumanoidRootPart)
	CharacterAttachA1.Name = "CharacterAttachA1"
	CharacterAttachA1.Orientation = Vector3.new(0,-180,90)

	local CharacterAttach2A2 = Instance.new("Attachment",HumanoidRootPart)
	CharacterAttach2A2.Name = "CharacterAttach2A2"
	CharacterAttach2A2.Orientation = Vector3.new(-0, 178, 90)

	local DragonAttachment = Dragon.PrimaryPart.HBA
	local DragonAlignPosition = Dragon.PrimaryPart.AlignPosition
	local DragonAlignOrientation = Dragon.PrimaryPart.AlignOrientation

	-- Setting the properties of the alignposition and alignorientation

	DragonAlignPosition.MaxForce = 500000
	DragonAlignPosition.Responsiveness = 20
	DragonAlignOrientation.MaxTorque = 500000
	DragonAlignOrientation.Responsiveness = 20

	DragonAlignPosition.Attachment0 = DragonAttachment
	DragonAlignPosition.Attachment1 = CharacterAttachA1

	DragonAlignOrientation.Attachment0 = DragonAttachment
	DragonAlignOrientation.Attachment1 = CharacterAttach2A2

	Dragon.PrimaryPart.Position = HumanoidRootPart.Position + Vector3.new(0,2.5,0)

	-- welds the model with the module dragon
	DragonModel:WeldModel(Dragon:FindFirstChild("BabyDragon"),Dragon.PrimaryPart)
	DragonModel:WeldModel(Dragon:FindFirstChild("TeenDragon"),Dragon.PrimaryPart)

	Dragon.Parent = Character

	Dragon:FindFirstChild("BabyDragon"):FindFirstChild("Humanoid"):LoadAnimation(Dragon:FindFirstChild("BabyDragon"):FindFirstChild("MovingAnim")):Play()
	print("Playing animation")
2 Likes

It is probably because you renamed the welds of the rig. So the body parts are looking for a weld to attach to that doesnt exist. But Idk, it could be something else.

2 Likes

dragons without the animation work perfectly normal but I want them to have an animation.

1 Like

This is the video I used to learn how to custom rig somthing. I can’t remeber the code off of the top of my head so here is a youtube video.
https://www.google.com/url?sa=t&source=web&rct=j&url=https://www.youtube.com/watch%3Fv%3Dx2MFFBvIF6Y&ved=2ahUKEwiwpPPYubn3AhUJnWoFHV19AZUQwqsBegQIBRAB&usg=AOvVaw1VbzLwu-CnF2D5uJPKwN50

2 Likes

image

1 Like

Is there anyone with a solution for this animation. I was thinking on an idea. Since I animated it using roblox animator is there a way where you can convert the animations to code?