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

Animating a sword when Button1Down?

Asked by 9 years ago

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!

0
So...the script works, it's just that the animation won't play? woodengop 1134 — 9y
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 DeDeaD564 15 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

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:

0
Okay I'll take a look. DeDeaD564 15 — 9y
0
If it doesn't, I'll let you take a look at my sword script cause I'm stumped. HungryJaffer 1246 — 9y
0
It works, thanks it really helped! DeDeaD564 15 — 9y
Ad

Answer this question