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

How to make an arm swing when using a sword?

Asked by
emite1000 335 Moderation Voter
10 years ago

So I am kind of making my own sword from scratch, but I can't seem to figure out how to make the arm swing when you attack. (I also wasn't able to easily identify it when scanning the basic sword script made by ROBLOX).

I want the sword to have a custom swing, but when I try using an animation it doesn't play when a tool is equipped in the hand. I also tried to manipulate the Motor6D properties but they didn't seem to change anything.

So how do I make an arm move around when using a tool? (I don't want a script, I just want to know how to do it).

1 answer

Log in to vote
1
Answered by
LevelKap 114
10 years ago

You need to create an animation. Look up joints and CFrame. Combine your knowledge of that and using loops to create these animations. ex:

for i = 1,10 do
    Player["RightShoulder"].C0 = CFrame.new(math.rad(10),0,0)
    wait()
    Player["RightShoulder"].C0 = CFrame.new(math.rad(-10),0,0)
    wait()
end
Ad

Answer this question