Hi there, TheSenorDuck. The RunAnim that the default Animate script made by Roblox isn’t an actual animation for sprinting the way you probably intend for it to be. I don’t know why they named it that as it is confusing - you’re right, it definitely looks like it just plays the animation faster.
To implement a sprint system in the past while merging with the existing default Animate script, I’ve made some edits in various parts that look something like this (you can use the search feature to find where these parts are inside the Animate script):
-------------------------------------
local animNames = {
idle = {
{ id = "http://www.roblox.com/asset/?id=507766666", weight = 1 },
{ id = "http://www.roblox.com/asset/?id=507766951", weight = 1 },
{ id = "http://www.roblox.com/asset/?id=507766388", weight = 9 }
},
walk = {
{ id = "http://www.roblox.com/asset/?id=507777826", weight = 10 }
},
run = {
{ id = "http://www.roblox.com/asset/?id=507767714", weight = 10 }
},
runOnKeybind = {
{ id = "http://www.roblox.com/asset/?id=507767714", weight = 10 }
},
-------------------------------------
function onRunning(speed)
if speed > 0.75 and Humanoid.WalkSpeed <= 16 then
local scale = Humanoid.WalkSpeed -- 16.0
playAnimation("walk", 0.2, Humanoid)
setAnimationSpeed(speed / scale)
pose = "Running"
elseif speed > 0.75 and Humanoid.WalkSpeed > 16 then
local scale = Humanoid.WalkSpeed -- 16.0
playAnimation("runOnKeybind", 0.5, Humanoid)
setAnimationSpeed(speed / scale)
pose = "Running"
else
if emoteNames[currentAnim] == nil and not currentlyPlayingEmote then
playAnimation("idle", 0.2, Humanoid)
pose = "Standing"
end
end
end
-------------------------------------
function stepAnimate(currentTime)
local amplitude = 1
local frequency = 1
local deltaTime = currentTime - lastTick
lastTick = currentTime
local climbFudge = 0
local setAngles = false
if (jumpAnimTime > 0) then
jumpAnimTime = jumpAnimTime - deltaTime
end
if (pose == "FreeFall" and jumpAnimTime <= 0) then
playAnimation("fall", fallTransitionTime, Humanoid)
elseif (pose == "Seated") then
playAnimation("sit", 0.5, Humanoid)
return
elseif (pose == "Running") then
if Humanoid.WalkSpeed <= 16 then
playAnimation("walk", 0.2, Humanoid)
else
playAnimation("runOnKeybind", 0.5, Humanoid)
end
There may be better ways to do this of course, but if you’d like to do it my way and need some assistance just let me know!