Issues Changing Player Animations While Already Moving

:warning: ISSUE

as you can see from the video included, whenever I use the ability I made, I change the players walk animation and walk speed for a certain duration and then return both properties back to normal however… The animation doesn’t stop showing until I perform another animation like jumping or going idle.

:exclamation: ATTEMPTED SOLUTIONS

I’ve tried different approaches on handling player animation like Humanoid:LoadAnimation() and I’ve also tried implementing Humanoid:GetPlayingAnimationTracks() inside of a for loop and stopping every animation through it but neither seem to work or give me any errors.

:speech_balloon: CODE

here is the few and only lines of code that handle changing the players walk animations and walk speed:

--[ CHECKS FOR THE HUMANOID, SLOWS CHARACTER AND CHANGES ANIMATIONS ]--
		local humanoid = character:FindFirstChild("Humanoid")
		if humanoid then
			humanoid.WalkSpeed = 8
			character.Animate.walk.WalkAnim.AnimationId = "rbxassetid://16635380307"
			character.Animate.run.RunAnim.AnimationId = "rbxassetid://16635380307"
		end

--[ HANDLE THE ABILITY SFX, *IGNORE THIS* ]--
		task.wait(abilityModule.abilityData.Instinct.Duration)
		instinctHighlight:Destroy()
		instinctWoosh:Destroy()
		instinctAftersound:Destroy()
		
--[ SETS WALKSPEED AND ANIMATIONS BACK TO ORIGINAL ]--
		humanoid.WalkSpeed = 16
		character.Animate.walk.WalkAnim.AnimationId = "rbxassetid://16460301108"
		character.Animate.run.RunAnim.AnimationId = "rbxassetid://16460301108"

Any help and suggestions are much appreciated!

Can’t you just do animationtrack:Stop()???

2 Likes

I played around with a few ways of using AnimationTrack:Stop() and found the solution by using Humanoid:GetPropertyChangedSignal() and tracking if the player is moving when the animation ends, cheers man :raised_hands:

No problem. GOod luck on your game! But then again shouldn’t i be marked the solution… meh.

1 Like

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