In the r15 animate script I have found in onRunning(Speed) function if you modify scale it will change the threshold at which you will swap to the running animation. I took a look at the r15 strafing animate script and I noticed that it does not have the scale in the onRunning(speed) function. Anybody else know where or how it changed within these two different animate scripts as navigating these animate scripts is difficult for me.
I could probably handle swapping between walk/run animations in a different script if I wanted. Just wanted to see if anybody knew how to do this in the default animate script Roblox gives us for strafing.
R15 Animate
function onRunning(speed)
local heightScale = if userAnimateScaleRun then getHeightScale() else 1
local movedDuringEmote = currentlyPlayingEmote and Humanoid.MoveDirection == Vector3.new(0, 0, 0)
local speedThreshold = movedDuringEmote and (Humanoid.WalkSpeed / heightScale) or 0.75
if speed > speedThreshold * heightScale then
local scale = 16.0 -- modify this for the threshold
playAnimation("walk", 0.2, 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
R15 Strafing Animate
function onRunning(speed)
local heightScale = if userAnimateScaleRun then getHeightScale() else 1
local movedDuringEmote = currentlyPlayingEmote and Humanoid.MoveDirection == Vector3.new(0, 0, 0)
local speedThreshold = movedDuringEmote and (Humanoid.WalkSpeed / heightScale) or 0.75
humanoidSpeed = speed
if speed > speedThreshold * heightScale then
playAnimation("walk", 0.2, Humanoid)
if pose ~= "Running" then
pose = "Running"
updateVelocity(0) -- Force velocity update in response to state change
end
else
if emoteNames[currentAnim] == nil and not currentlyPlayingEmote then
playAnimation("idle", 0.2, Humanoid)
pose = "Standing"
end
end
end
