Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Custom walking animation gets cut out by ROBLOX walking animation?

Asked by 6 years ago
Edited 6 years ago
function Equipped()
    Character = Tool.Parent
    Player = Players:GetPlayerFromCharacter(Character)
    Humanoid = Character:FindFirstChild("Humanoid")
    RootPart = Character:FindFirstChild("HumanoidRootPart")
    Humanoid.Running:Connect(function()
        local run=Humanoid:LoadAnimation(script.Parent.Animations.R15.SwordRun)
        run:Play()
    end)
end

(This script is on a server script inside of a sword)

The priority setting of the animation doesn't seem to be the problem as the animation gets cut off despite what setting it's on, including "action". Is there any way to keep an animation running without it getting cut off?

1 answer

Log in to vote
3
Answered by
oftenz 367 Moderation Voter
6 years ago
Character.Animate.Disabled = true
            local ActiveTracks = humanoid:GetPlayingAnimationTracks()
            for _,v in pairs(ActiveTracks) do
                v:Stop()
            end

This script disables animations so that your animations won't be bothered. This needs to be a localscript.

Ad

Answer this question