Hi! I’m just curious on how I can “animate” the second sword in my hand, since I’m creating a dual wielded sword.
By default the left arm for tools is already welded so it looks like they are holding the tool, how can I do it with the other arm?
You could use an accessory to easily have 2 weapons and weld the second weapon to the hand. You would animate both of them, just like you would animate one sword. Making sure it’s connected to character. Then from there, you would just play your animation for attacking, etc.
Here’s a post on how to do that.
Since Roblox tools in-engine are designed to only work for the right arm by default,
you’d have to write your own script that creates and welds the sword to the left hand (don’t forget to destroy the weld when unequipping).
Tools have a very neat .Equipped
event that fires whenever the tool is equipped.
You do have to create the weld server side since otherwise it will not replicate.
Sword.Equipped:Connect(function()
left_arm = script.Parent.Parent:FindFirstChild("Left Arm")
if left_arm then
local weld = Instance.new("Motor6D")
-- I think you know the rest from here.
end
end)
This should work in a server script, although this is the lazy way to do it.
Animations should work although I have not exactly tested this out yet.
Not sure if you want to animate the sword itself or just the arm that holds it.
Also this assumes you’re using R6, otherwise you’d have to look for Left Hand
instead.
That doesn’t seem to work, you should elaborate what you mean.
Here’s the script by the way:
script.Parent.Equipped:Connect(function()
local left_arm = script.Parent.Parent:FindFirstChild("Left Arm")
if left_arm then
local weld = Instance.new("Motor6D")
weld.C0 = left_arm.CFrame
weld.C1 = script.Parent.Handle2.CFrame
weld.Parent = script.Parent.Handle2
end
end)
Welds need 2 parts.
You haven’t specified Part0 and Part1.
Part0 should be the left arm, Part1 should be the handle of the left sword.
Still not working.
script.Parent.Equipped:Connect(function()
local left_arm = script.Parent.Parent:FindFirstChild("Left Arm")
if left_arm then
local weld = Instance.new("Motor6D")
weld.Part0 = left_arm
weld.Part1 = script.Parent.Handle2
weld.Parent = script.Parent.Handle2
end
end)
Are you using R6 or R15?
Provide screenshots and error messages?
R6, no error messages.
The hand isn’t animated, that’s the issue, the left arm is just like it is when you’re not holding any swords.
Does your animation include the left hand?
I assume the sword is attached though?
You still have to play the animation.
Please include screenshots of the sword and the object hirachy.
It’s not an animation, I’m trying to achieve the default animation roblox uses on my left arm (when you equip a tool.)
What animation?
23o0irho2 limit
Roblox default animation does not have any keyframes for the left arm.
The animation literally does not have data for the left arm.
You would have to make your own animation and animate the left arm.
I don’t believe it’s possible since it’s not built in. I would recommend using the method I sent earlier it will make your life much easier, I’ve used it in the past, and has worked like a charm. If you want a animation on the left hand you will have to animate it and play it whenever the tool is equipped.
So I would need to parent the animation to the left arm when it’s equipped, then play it, then remove it again once it’s unequipped?
That’s for a single sword though, I didn’t understand it if it was meant for dual swords.
You can equip multiple accessories, so you can have it duel weld.
Doesn’t explain how, so I don’t understand how it’s done due to unclear documentation.
The animation’s parent does not matter, animations are just containers that hold keyframes.
You actually have to make a animation in the Roblox animator (or animator of choice) and upload it, then play that animation ID.