After death, the animation does not play

I created a single mesh animation, but after the humanoid has 0 lives, it just stops the animation that was and does not play any other animations anymore. What could be the problem?

2 Likes

So when the humanoid has no health it stops playing the animation? Could I see the script playing the animation?

		I think I've solved the issue
for index, animator in pairs(npc:GetDescendants()) do
				if animator.Name == 'Animator' then
					for _, playingTrack in ipairs(animator:GetPlayingAnimationTracks()) do
						--playingTrack:Stop(0)
					end
				elseif animator.ClassName == 'MeshPart' or animator.ClassName == 'Part' then
					--animator.CanCollide = false
					--animator.CanQuery = false
					if animator.Name == 'HumanoidRootPart' then
						--animator.CollisionGroup = 'Players'
						--animator.Anchored = true
					end
				end
			end
end
			for _, playingTrack in ipairs(humanoid:GetPlayingAnimationTracks()) do
				playingTrack:Stop(0)
			end
			npc.HumanoidRootPart.Anchored = true

I originally used Getdescenders to identify the parties and animations in the humanoid and definitely give each its own powers. But it didn’t work and the animation was getting up. I redid the script and wrote it differently, I note that I do not see the difference between turning off animations in a humanoid and in an animator. It seems that everything began to work stably, well, at the very beginning, just in case, I wrote the line state.Died = false

According to the first principle, where I hid the lines to reveal why the animation did not work, it did not give anything necessary. Because it didn’t work even with hidden lines. In general, it is not clear why using Getdescenders this happened and the animation got stuck.

1 Like

Wait so did you solve it? Sorry, it’s not very clear

Idk if this works but if you turn off this property the character model should remain intact a your animation would have a character to animate.

image

Yes, I decided, as described above. If someone could explain to me why this decision was caused in the way I described above…

I tried to do what you write, it didn’t work like that, it worked as described above in the resolved issue

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.