Making a tool animate separately during animation

I’ve been having an issue getting a tool with 2 wands to operate independently of each other. I have tried Motor6D, but I can not get it to work correctly as I am not highly familiar with Motor6D.

For context, the goal is to have a list of animations for when a player opens up the tool and the relative animation will play. The tool is a ground crew wand that the GC worker will use.

I manage to get it to work using the AnimationEditor through deleting the weld holding the 2 wands together, and creating a weld between the handles and the arms, but when I attempt to use the animation in game, the main wand simply falls and seems to have no part in the tool, while the main wand will work, but it will not animate.

Below is a video of the goal animation.

1 Like

try this!
local tool = script.Parent

local anim = Instance.new(“Animation”)

anim.AnimationId = “rbxassetid://8572359340…” ------- Your animation id here------ Make your animation an action one

local track

tool.Equipped:Connect(function()

track = script.Parent.Parent.Humanoid:LoadAnimation(anim)

track.Priority = Enum.AnimationPriority.Action

track.Looped = true

track:Play()

end)

tool.Unequipped:Connect(function()

if track then

track:Stop()

end

end)

1 Like

This unfortunately didn’t work, do you have any other ideas? I added print statements throughout the script to see where it may be going wrong, and it went through all just right.

1 Like

Actually, it did work after I made a few adjustments to it. However, the wands do not act separately. Do you know why this may be?

:es: prueba esto tal vez te funcione a mi me ha funcionado con muchas animaciones


:us: : try this maybe it works for you it has worked for me with many animations


:scroll: --Variables–

local set = script.Settings

local sp = set.Speed

local enabled = set.Enabled

local hum = script.Parent:WaitForChild(“Humanoid”)

if hum then

print(“Success”)

else

print(“No Humanoid”)

end

local humanim = hum:LoadAnimation(script:FindFirstChildOfClass(“Animation”))

–Playing Animation–

if enabled.Value == true then

humanim:Play()

humanim.Looped = true

humanim:AdjustSpeed(sp.Value)

end:

1 Like

image

1 Like

image

you can change the handles to what ever name you tool parts that the players holding are.

maybe try my welding script:
script.Parent.Changed:connect(function(c)

if c == “Parent” and script.Parent.Parent:FindFirstChild(“RightHand”) ~= nil then

local w = Instance.new(“Weld”)

w.Parent = script.Parent.Parent[“RightHand”]

w.Part0 = w.Parent

w.Part1 = script.Parent.H1----- handle one for your duel weld

w = Instance.new(“Weld”)

w.Parent = script.Parent.Parent[“LeftHand”]

w.Part0 = w.Parent

w.Part1 = script.Parent.H2----- handle two

end

end)

1 Like

That unfortunately didn’t work. Is there anything specific I should do for it? I tried both local and server script.

I added some print statements to try and see where it goes wrong, and it seems like it doesn’t even run?

EDIT: After messing around with it, the print statements started to show, signalling that the script was running correctly, but it didn’t fix the issue :confused:

Do you by chance have any other ideas??

EDIT2: I have been messing around and editing the script slightly, and instead of the wand welding to the hand, it’s the other way around, and the arm comes off of my player onto the tool and it’s in the middle of the arm rather than the end (Working with R6)

its a server script. I made a model for example Dual Katana - Roblox here

1 Like

Okay. I’ll try to transfer it to my use tomorrow, I am currently off of my pc.

Thanks for your help, by the way.

1 Like

Hey! That didn’t work quite how I needed it to; however, I did manage to create a script that operates like expected.

One issue I am facing now is trying to get a running animation to stop and reset to the default player idle animation when the tool is equipped. By running I mean the animation is actively moving the character. Do you have any ideas why this may be happening?