I have this script that disables your current animation and changes to another when it’s pressed it works completely fine however whilst you’re walking it keeps you in a static idle animation until you walk in another direction how would make it change animations without it being static, I have tried stopping all current animations tracks too.
Character.Animate.Disabled = false
Character.SwordAnimate.Disabled = true
Can I see your script please ?
if Request == “sword” then
for u,c in pairs(Character.Humanoid:GetPlayingAnimationTracks()) do
c:Stop()
end
Character.Animate.Disabled = false
Character.SwordAnimate.Disabled = true
end
All it does is disable your animations and enable another script with different animation ID’s.
It’s actually quite simple;
You see, there’s a parameter argument in :Play()
and :Stop()
which is the fade time.
For example, if I were to do :Play(0.5)
, it would take 0.5 seconds to transition. Same applies for :Stop()
.
6 Likes
Could you show an example please? Tried several different things doesn’t seem to work.
Ok, here’s an example:
local animation = humanoid.Animator:LoadAnimation(animationObject)
animation:Play(0.5) -- transitions 0.5 seconds
wait(5) -- waits 5 seconds
animation:Stop(0.5) -- transitions 0.5 seconds
12 Likes