-- LocalScript to change the running animation

-- Replace with the animation ID you want to use
local animationId = "rbxassetid://522635514"

-- Function to change the running animation
local function onCharacterAdded(character)
    -- Wait for the humanoid to be available
    local humanoid = character:WaitForChild("Humanoid")
    
    -- Create a new animation
    local newAnimation = Instance.new("Animation")
    newAnimation.AnimationId = animationId
    
    -- Create an AnimationTrack for running
    local animationTrack = humanoid:LoadAnimation(newAnimation)
    
    -- Create an AnimationController to control the animation
    local animationController = character:FindFirstChildOfClass("AnimationController") or Instance.new("AnimationController", character)
    
    -- Play the new running animation
    humanoid.Running:Connect(function(speed)
        if speed > 0 then
            animationTrack:Play()
        else
            animationTrack:Stop()
        end
    end)
end

-- Connect the function to when the character is added
game.Players.LocalPlayer.CharacterAdded:Connect(onCharacterAdded)

-- Handle the case where the character is already in the game
if game.Players.LocalPlayer.Character then
    onCharacterAdded(game.Players.LocalPlayer.Character)
end

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: