How to script a duel wield weapon

I’m kind of struggling to script my duel wield weapon. I scripted its equipping but I’m struggling to script it’s attacks, I’m good with single handed ones. I’m not sure how could I go about on duel handed ones. Any help is appreciated. Thanks :grinning_face_with_smiling_eyes: [I did search a lot on Youtube and also on the DevForum but couldn’t find anything useful and ended up seeing showcases]

1 Like

With single-handed I’m assuming u mean with tools I cant see how you would create a dual-wielding weapon without setting up a rig at least if u want the animations to be nice. here’s a tutorial that help me understand how to animate/script with motor6ds

Once you understand how to attach both weapons to the player’s character via motor6ds to animate attacks I think it will be easier for you to make a dual-wield weapon if you have any questions please ask.


I’ll try that out! Thanks :grinning_face_with_smiling_eyes: … I’ll reply back if it doesn’t help with my situation

Also, you suggest that its better using Motor6D rather than welds?
I installed the plugin mentioned in that post but I don’t seem to find “New Motor6D” option.

You using welds to connect the swords so that they will be picked up in an animation editor and be animated. Welds would just glue something together.

That plugin doesn’t seem to show “New Motor6D” option tho…

My plugin looks like this

Something’s weird with mine lol :joy:

Edit: I restarted studio, its fine now… :slight_smile:

1 Like

Well the attaching part with Motor6d worked out but animation doesn’t work when I script it
This is the equip animation I want:
This is how it is now (normal pose):
My local script:

local plr = game.Players.LocalPlayer

local char = plr.Character or plr.CharacterAdded:Wait()

local tool = script.Parent

local humanoid = char.Humanoid

local animator = humanoid.Animator

local equipAnim = animator:LoadAnimation(script.Parent.Equip1)




I tried with both Load Animation and Animator method but no result.

Nvm I used tool.Changed and did some if statements and now it works. Thanks!
But tool.Activated is still unfunctional

make the animation priority to “Movement” or “Action”

It’s always been in Action mate :slight_smile:
Equip Anim works now I’ need to fix activated

Hello, its me again.
After numerous times of editing my code my dual weapon works now thanks to @Extrenious and @p49p0 for trying to help me.
What I did to make it right?
Solution: I created a “Handle”(I was previously having two handles, which I put inside this new handle), then I set Require Handle property in my tool to false and add my code again.
@Extrenious , Thank you for helping me out to use Motor6D to attach my tool.
This is how it is now: Screen capture - ddd2d692bc5f338577410e51798ca706 - Gyazo
My sincere thanks to all who helped! :slight_smile:

1 Like