Animation not working the way I want

I’m making a sword animation, and I put a motor6D inside the right arm of the dummy, and then connected to the right arm and the handle.
After I animated the sword and exported to roblox and I put it in my tool, it doesn’t work as I expected.
Issue: robloxapp-20200518-1942492
How it should be: robloxapp-20200518-1944471

I tried a script that makes a motor6D that connects the handle to the rightarm, but still didn’t work.

thats because your tools grip is messed up, use the tool grip editor plugin by @Maximum_ADHD

But the tool has also an animation.

the tool itself?!
(30 characters)

I animated the tool together with the arms, but just the arms animation play and the tool doesn’t.

you cant load a animation on a inanimate object, as i said earlier: use clonetroopers tool grip editor plugin, that is the fix

That isn’t the fix, take yourself down a few levels lol.
He’s trying to apply an animation transform to the RightGrip of a Tool.

The problem is that the the tool’s RightGrip is always a Weld rather than a Motor6D, so no animation transform can be applied.

7 Likes

I did Humanoid:LoadAnimation(script.Parent.Idle)
Also, this is how it went after I used the plugin:

Not like the video

but couldnt he use your plugin to move the tools grip upwards, making the character hold the swords handle?

edit: edit the rotation of the handle for it to be like in the video

1 Like

No, he’s trying to use Roblox’s animation system to animate the grip, he doesn’t want to use the Tool’s Grip property, which forces the RightGrip to be a Weld instead of a Motor6D.

1 Like

Yeah, but the sword is literally sticked to the hand bottom.
I wan’t to know how to get the animation to work in the tool also, so I can make better stuff in the future.

oh sorry for misunderstand
(30 characters)

Here’s a script that you can use to make the grip animated.
Put it inside of the Tool and see if it works out.

local tool = script.Parent
local handle = tool.Handle

local function onEquipped()
	local character = tool.Parent
	local humanoid = character and character:FindFirstChildOfClass("Humanoid")
	
	if not humanoid then
		return
	end
	
	local rigType = humanoid.RigType
	local targetLimb
	
	if rigType.Name == "R15" then
		targetLimb = "RightHand"
	else
		targetLimb = "Right Arm"
	end
	
	local limb = character:FindFirstChild(targetLimb)
	local rightGrip = limb and limb:WaitForChild("RightGrip", 2)
	
	if not rightGrip then
		return
	end
	
	local newGrip = Instance.new("Motor6D")
	newGrip.Name = "RightGrip"
	newGrip.Part0 = limb
	newGrip.Part1 = handle
	newGrip.C0 = rightGrip.C0
	newGrip.C1 = rightGrip.C1
	newGrip.Parent = handle
	
	rightGrip:Destroy()
end

local function onUnequipped()
	if handle:FindFirstChild("RightGrip") then
		handle.RightGrip:Destroy()
	end
end

tool.Equipped:Connect(onEquipped)
tool.Unequipped:Connect(onUnequipped)

It should be a regular Script to work correctly.

5 Likes

What I think is, feel like the animation doesn’t play because you need to replace the toolgrip weld with a motor6d, if it still doesn’t work after, you might have to try inserting the handle of the tool inside a model, inside the player.

Could be wrong but don’t think you can animate parts that are parented under a tool object, must be parented under a part or model object with motor6d.

1 Like

The animation in the tool is now playing, but the position of the sword is not in the way I want, like the animation.

That’s weird. How did you attach the sword when you added a Motor6D joint to animate it? Did you use the same Part0/Part1 and C0/C1 values?

2 Likes

I made the part0 the right arm and part1 the handle.
Also what is that “C0/C1”

Try deleting these lines from the script I gave you.

newGrip.C0 = rightGrip.C0
newGrip.C1 = rightGrip.C1
4 Likes

It almost fixed, but the tool is going to the right, instead of staying in the right place.

I tested with other tools, they all go to the right a bit.