Trouble with idle animations

I’m having trouble with making an idle animation for my sword. There are two issues:

A] The animation I made does not play as intended when playtesting.

What it’s supposed to look like:


What it looks like in game:
image

If you still cannot see it, in game, the torso is forced into an upright position, messing up the animation.

B] My character’s default idle animation package overlaps with this one. Also not very good.

I’ve tried messing with all animation priorities but no luck.

Script:

image

I would start with overriding the default animations. There are a few places you can do that. Roblox supplies code, or you can edit the values here:

In the Animate script here:

local animNames = { 
	idle = 	{	
				{ id = "http://www.roblox.com/asset/?id=507766666", weight = 1 },
				{ id = "http://www.roblox.com/asset/?id=507766951", weight = 1 },
				{ id = "http://www.roblox.com/asset/?id=507766388", weight = 9 }
			},

Or using provided scripts here:

Using Animations in Games (roblox.com)

Basically, Animate only worries about weighting in picking an idle animation to run, it doesn’t even check what else might be running. 2 animations with no weighting rules = 50/50 split between the two.

I’m trying to play it when the tool is equipped. When I try and change the IDs via the values, it does not do anything. Plus, I can’t really put the AnimationId into the Animate script, as it’ll be always playing, which, is also, not what I need.

Ahh, ok, I understand. You want to have 2 different states, with and without tool. EASY: You need to set the priority higher than idle (Movement or Action) if you want it to override the Idle animation (Animation Editor). The drawback is it will mess with default movement too.

or MEDIUM: you need to swap out the idle animations while tools are equipped, and then switch it back. (use the provided script in the link I posted)

Those are the easy fixes.

HARD: find the idle animations via GetPlayingAnimationTracks, ratchet them down via the AdjustWeight function, then find them and switch them back. This is hard because Animate continues to swap around idle and the tracks will not be the same when you switch them back.

And, for kicks, what I did:
VERY HARD: Rebuild Animate to work for you.

And what I want to do:
UNKNOWN: Create more AnimationPriority Enum states so I can have different levels of idle.