Animation not working correctly?!

oh its an idle animation? how many frames is it and do you have it set as looped? (sorry for not realizing haha, i thought you were trying to make an equip animation)

13 Likes

Its 1 frame cause I just want the arm to stay at that position with the sword for now. And I have set it looped in the animation editor but I don’t think that will cause it. But I will unloop it and see what happens.

13 Likes

no, its not that its looped. put it back on idle too. this is weird and it should work. let me think

12 Likes

also you know you can use player.Character right?

12 Likes

Maybe this helps coming up with an answer:

13 Likes

press the “loop button” first of all then make that the animation (set it to idle too)
image
also is this team create or are you creating it alone?
if its team create then did you create the animation?
also the method you use is deprecated so use this as seen here

local player = game.Players.LocalPlayer

local animation = game.Workspace:WaitForChild(player.Name):WaitForChild("SwordAnimations").swordIdle
local humanoid = game.Workspace:WaitForChild(player.Name):WaitForChild("Humanoid")
local tool = script.Parent
local track = humanoid:FindFirstChildOfClass("Animator"):LoadAnimation(animation)
tool.Equipped:Connect(function()
	track:Play()
end)
13 Likes

It is not team create. And its not the deprecated thing either cause it has still the same results.

11 Likes

i know its not cause its deprecated. but you should try to avoid using deprecated stuff. (example: instead of wait() do task.wait() )

12 Likes

but i really dont know what the problem is. it should work

13 Likes

I think I might know the problem ima see if it is.

EDIT: It didn’t solve it. I thought it might be because it is not my actual character but a model with the name StarterCharacter inside StarterPlayer.

10 Likes

Maybe it has something to do with the handle or grip?

12 Likes

What is the problem over here?

11 Likes

For the ones that try to help me here is some more information:

As soon as I press 1 to equip the tool the animation is being played. Atleast it calls the :Play() function.

But somehow the standard tool holding thing is being played. And then when I unequip the tool the animation is still playing but I can the arms.

So it has to be a problem with the tool itself. But I don’t know what.

11 Likes

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