Hey! I’m trying to make switch between the walk and run animation using the default Animate local script. The issue is that (only on server-side, for other players) the running animation doesn’t stop after I stop running, check this video.
I tried making a remote for it, changing humanoid state type, manually calling the functions, changing the animation loop value and more. The only thing that “worked” is jumping at the same time that I stop running, but it obviously isn’t a solution (I tried playing around with .Jumping, .Freefall and .Landed humanoid state types but it didn’t work).
This is the short code I use in Animate local script (as I said, the default one created by Roblox, all of the functions included are the ones created by Roblox, slightly modified), I change ID’s from a different local script:
script:WaitForChild("run").RunAnim:GetPropertyChangedSignal("AnimationId"):Connect(function()
if pose == "Running" then
playAnimation("run", 0.2, Humanoid)
setAnimationSpeed(runAnimSpeedMultiplier)
end
end)
I don’t know if I understood much, but you don’t need to localize this, just find out that if the player walks less than speed 16, or higher to play a different animation
Humanoid.Running:Connect(function()
if (Humanoid.WalkSpeed <= 16) then
print("AnimationWalk:Play()")
print("AnimationRun:Stop()")
else
print("AnimationWalk:Stop()")
print("AnimationRun:Play()")
end
end)
I already do that, but Animate local script allows you to smoothly change between the core animations. If I do it from an own script, it will be awfully blended or completely override it.
I already know all of that, I’m using that exact script, and actually it will be replaced with the ID’s you put inside the script. You should open the script and check at the functions (and everything else, since that script also uses a .Running I’m including in my post!