Here's the script that i made for the running animation.
local UIS = game:GetService("UserInputService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local runAnim = Instance.new("Animation")
runAnim.AnimationId = "rbxassetid://5827492961"
local character = player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local humAnimator = humanoid:WaitForChild("Animator")
local runAnimConfirm = humAnimator:LoadAnimation(runAnim)
local isKeyPressed = false
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftShift then
isKeyPressed = true
if isKeyPressed == true then
humanoid.WalkSpeed = 32
runAnimConfirm:Play()
end
end
end)
UIS.InputEnded:Connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftShift then
isKeyPressed = false
if isKeyPressed == false then
humanoid.WalkSpeed = 16
runAnimConfirm:Stop()
end
end
end)

1 comment
It didn't do as i wanted, it stopped the custom animation.