don’t really know how to describe this but whenever i spam the movement button, in some instances the animation will reset and i don’t really know how to fix it
example:
code:
hum.Running:Connect(function(speed)
if speed > 0 and speed < 18 and not anim.walk.IsPlaying then
anim.idle:Stop()
anim.walk:Play()
elseif speed > 18 and not anim.run.IsPlaying then
anim.run:Play(.5, 1)
anim.walk:Stop(.75)
elseif speed == 0 then
anim.idle:Play()
anim.walk:Stop(.25)
anim.run:Stop(.25)
end
if speed < 18 and anim.run.IsPlaying then
anim.walk:Play(.5, 1)
anim.run:Stop(.75)
end
end)
what i’m (trying) to achieve:
please let me know if there is any better way to code animation too! thanks