Animationtrack.Stopped not working

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want the HumanoidRootpart to unanchor after the animation has finished playing.
  2. What is the issue? Include screenshots / videos if possible!
    The HumanoidRootpart will still stay anchored.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have searched around on developer hub and here.
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
	local Character = Player.Character
	local Humanoid = Character:WaitForChild("Humanoid")
	local HRP = Character:WaitForChild("HumanoidRootPart")
	
	local Animator = Humanoid:FindFirstChildOfClass("Animator")
	
	local iceSpikeAnimation = Animator:LoadAnimation(script.IceSpikeAnimation)

	iceSpikeAnimation.Stopped:wait()
		HRP.Anchored = false

These are the parts that i think is the most important.

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

Does it play the animation? From the script you provided, I don’t see it playing.
Maybe add iceSpikeAnimation:Play() above the Stopped.

It’s a completely different object. Strange enough, it does not include any Stopped event.

1 Like

So, maybe load the animation on the humanoid, not the animator object.

local iceSpikeAnimation = Humanoid:LoadAnimation(script.IceSpikeAnimation)

Oops! My mistake. I was actually mixing up two things now and finally understood that it was only the replication that changed.

Do not use lowercase Event:wait(), use the Event:Wait() instead.

I forgot to show that line of code, but I have it added.

Isn’t that a deprecated method?

Somehow it got solved when I changed the position of some code.