Animation not working correctly?!

if you don’t want the tool animation to be played you have to add a keyframe for every part on the character you don’t want to get overrided, also set the action to something higher maybe, and if you want it to stop on unequip, use the unequip event to do :Stop() on the animtrack

9 Likes

All the parts that i didnt want the charachter to override are all the parts in the right arm which also is the arm that the standard tool animation is on. I changed the animation priority to action04 and both didn’t change anything.

8 Likes

How to disable tool equip anim - Help and Feedback / Scripting Support - Developer Forum | Roblox

9 Likes
local track = humanoid.Animator:LoadAnimation(animation)
8 Likes

This helped but now one problem left. Since the animation now is correctly played when I want it but it is not playing the full anmation:

Reference 1:

Reference 2:

7 Likes

Try setting the key frames through the whole path, not just start and end, because that means they can be overrided during that moment, and maybe the idle anim is the one causing that

8 Likes

if i dont move the animatin is wrong but if i move it is correct so how do i make it so it is correct when the player is idle as well?

9 Likes

First off, Never do game.Workspace:WaitForChild(player.Name)
Do

local character = player.Character or player.CharacterAdded:Wait()

Second off, make sure the animation is looped, but if it is then

I saw in one of the images you sent that there is a second set of keyframes, I have no clue why you have a second set if it is just a grip unless the arm is in constant motion, can you show me what the second set of keyframes look like?

8 Likes

The second frame is the same as the first I thought it would make a difference.

Also, when I walk the arm with the sword in its hand is kinda wobbly instead of still. Like when I move the arm moves too but I want the arm to be still and the rest of the body be moving.

8 Likes

This is an issue with the tool not with your code. If the second frame is an exact copy of the first, You have Requires Handle on the tool enabled, Turn it off. The animation of requires handle is overlapping your animation.

9 Likes

image
Fill all the sequence with keyframes, just copy and paste them, through all the path, not only on start & end

7 Likes

I did that as you can see here:

But it didn’t fixed it I also turned RequiresHandle off.

8 Likes

Set the animation priority to walking, the animation doesnt play correctly because ur animation probably has action priority or idle

8 Likes

RequiresHandle requires to be enabled if your tool has Handle in it. It doesn’t fix uncorrect animation playback.

9 Likes

The issue is still not solved yet?

5 Likes

now you weld the sword to the character’s hand
It should work just fine by doing something like this:

tool.Equipped:Connect(function()
    local char = pistol.Parent
	local rootPart = char.HumanoidRootPart
	local manualHandle = sword.swordHandle
	gun.CFrame = rootPart.CFrame
	local attch = Instance.new("Weld")
	attch.Parent= rootPart
	attch.Part0 = rootPart
	attch.Part1 = manualHandle
end)

and you destroy the weld on unequip
though i’m afraid that’s not necessary

4 Likes

I did that and here is the result:

image

Not quite what were looking for lol. And the arm position is still not the same the only difference here is that the sword is in its head.

See the difference between this image and the other 2 i send above.

3 Likes

Are you in team create? And is the animation uploaded under you or a group?

3 Likes

Im not in team create and I uploaded the animation.

3 Likes

load the animation under the equip function and make sure animation priority is action or action+, if youre using the stock roblox sword with its old scripts in it that might be overriding whatever you have here since its such an old and jenky script

1 Like