RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"create a shift to run script with run animations"
-- local script local player = game:GetService("Players").LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local runAnim = Instance.new("Animation") runAnim.AnimationId = "rbxassetid://507770453" -- Replace with your run animation asset ID local runTrack = humanoid:LoadAnimation(runAnim) local isRunning = false local function onInputBegan(input, gameProcessed) if input.KeyCode == Enum.KeyCode.LeftShift and not gameProcessed then isRunning = true humanoid.WalkSpeed = 24 runTrack:Play() end end local function onInputEnded(input, gameProcessed) if input.KeyCode == Enum.KeyCode.LeftShift and not gameProcessed then isRunning = false humanoid.WalkSpeed = 16 runTrack:Stop() end end game:GetService("UserInputService").InputBegan:Connect(onInputBegan) game:GetService("UserInputService").InputEnded:Connect(onInputEnded)