Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Animating a sword when Button1Down?

So far the questions and their answers that I looked at has worked but there is one problem which has made me to make this question and SEE if I can get an answer and to also not get told off by moderators '-', and that is -How to make all of your body parts move when animation is playing, yes it works fine but I want someone to give me a insight and examples of how to make everything move that includes the arm equipped by the tool because so far that arm doesn't move.

This is the script that I've used its parent is the Tool; The Tool has nothing else but itself and the script.

tool = script.Parent
player = game.Players.LocalPlayer.Character
Humanoid = player.Humanoid

tool.Equipped:connect(function(mouse)
mouse.Button1Down:connect(function()
    local animation = Instance.new("Animation")
animation.Parent = player
    animation.AnimationId = "http://www.roblox.com/Testing-x1-arms-item?id=271181303" --Make sure this is one of your own animations, you can't play other people's because roblox doesn't allow it.
    local animTrack = Humanoid:LoadAnimation(animation)
    animTrack:Play()
end)
end)

Please Please Please! Explain in detail and like above give an example. Thank you!

2 comments

0

So...the script works, it's just that the animation won't play?

0

No the animation is fine but the problem is that the arm equipping the tool will stay the same while the animation is playing so basically if I play an animation of the robloxian waving both hands only the left hand will wave

1 answer

✓ Accepted answer

This does not have to do with the script itself, but the Animation. In the Animation editor, you want to change the Priority to Action, with this, it will override any other animations.

Sources: I made an animated sword myself c:

3 comments

0

Okay I'll take a look.

0

If it doesn't, I'll let you take a look at my sword script cause I'm stumped.

0

It works, thanks it really helped!

This discussion is preserved as it was. New answers, comments, and votes are closed.