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

How do you make an animation run on a arm with a tool equipped?

Asked by 6 years ago

So I have a animation that runs on a player when a tool is equipped. It doesn't affect the right arm when the tool is equipped though.

Heres my tool script, I don't think it affects this problem though.

local Tool = script.Parent
local Animation = nil
local Track = nil
local Player = game.Players.LocalPlayer

function Equipped()
    --set up animation
    local Character = Player.Character
    Animation = Instance.new("Animation",Character.Humanoid)
    Animation.Name = "Axe_Swing"
    Animation.AnimationId = "rbxassetid://1464544078"
    Track = Character.Humanoid:LoadAnimation(Animation)
    wait(2)
    Track:Play()
end
function Unequipped()

end
Tool.Equipped:connect(Equipped)
Tool.Unequipped:connect(Unequipped)

1 answer

Log in to vote
0
Answered by
mattscy 3725 Moderation Voter Community Moderator
6 years ago

This is most likely because the animation priority of the animation is not high enough to overwrite that of the tool holding animation. To fix this, you can add this line after you use LoadAnimation:

Track.Priority = Enum.AnimationPriority.Action --highest priority
0
Yep that worked. Thanks :) Wafflecow321 457 — 6y
Ad

Answer this question