There’s this animation I want to stop but whenever I refrence the animation ex: game.Workspace.Animation:Stop() It says that stop is not a valid member of Animation why is this am I just stupid?
Could you please show us your workspace and code?
in the script where you play the animation it should be something like this:
local anim = workspace.Animation
local humanoid = plr.Character.Humanoid
local animtrack = humanoid:LoadAnimation(anim)
animtrack:Play()
--to stop it just
animtrack:Stop()
Thanks, this helped and I kinda already knew this the problem was I was struggling with defining variables and needed to define variables outside the function Thanks!
Humanoid:LoadAnimation()
is deprecated. Please refrain from using it in posts related to animations.
What do you mean isnt this the way to play animations?
Sorry, I didn’t know it was deprecated as I don’t use it at all, and only knew that it was a way to load animations.
You can still load it that way but I recommend you don’t use deprecated methods.
New LoadAnimation method is;
Humanoid:WaitForChild(“Animator”):LoadAnimation()
So wait are you storing this animation in the humanoid and if so whats different from his method?
Also it wont stop animation still for some reason
Try doing this (also dance it’s the animation but loaded on the humanoid)
dance:Play() wait(dance.Length) dance:Stop()