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

How do I make an animation play when you are holding a tool by pressing "f" on your keyboard?

Asked by 7 years ago

What I want to happen is to make an animation play when you are holding a tool by pressing the "f" on your keyboard. The animation plays for every limb except the one that is holding the tool.

 local tool = script.Parent
local Player = game.Players.LocalPlayer
tool.Equipped:connect(function(mouse)
    mouse.KeyDown:connect(function(key)
        key = key:lower()
        if key == "f" then
            local anim = Player.Character.Humanoid:LoadAnimation(script.Animation)
            anim:Play()
            print("SWORDFRENZY")
        end
    end)
end)

This is the code that plays the animation in the tool by press "f" but the arm holding the tool doesn't move for some reason. How can I make the arm holding the tool move along with the animation?

0
You don't, as tools disable arm's movement. hiimgoodpack 2009 — 7y
0
Animation Priority exists @hiimgoodpack Goulstem 8144 — 7y
0
Thanks Guys awesomeestef1 -3 — 7y

Answer this question