How can I make it so at a certain speed the run animation plays? Im using the default animate script for R6 but it appears that the running just never play, no matter the character’s speed.
The walk one is the only one to play.
How can I make it so at a certain speed the run animation plays? Im using the default animate script for R6 but it appears that the running just never play, no matter the character’s speed.
The walk one is the only one to play.
local script parented to starterplayer.startercharacterscripts
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local walk = --path to walk animation
local run = --path to run animation
local walktrack = character.Humanoid:WaitForChild("Animator"):LoadAnimation(walk)
local runtrack = character.Humanoid:WaitForChild("Animator"):LoadAnimation(run)
character.Humanoid.Running:Connect(function(speed)
if speed >= 12 then
runtrack:Play()
walktrack:Stop()
elseif speed <= 12 and speed > 0 then
runtrack:Stop()
walktrack:Play()
elseif speed == 0 then
runtrack:Stop()
walktrack:Stop()
end
end)
you can adjust speed at which animations start playing to your liking just keep in mind that animations should be looped
humanoid.running docs
Thanks, Im gonna try later and let you know if it worked!