R6 Humanoid not playing animation

REPOST: I asked a question in the other one and nobody answered to it afterwards.

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    R6 model to play animation
  2. What is the issue? Include screenshots / videos if possible!
    animation is not playing.
  3. What solutions have you tried so far?
    Change animation priority.
    Did you look for solutions on the Developer Hub?
    Yes. Did not work…

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

function playAnimation(humanoid, animationId)
	local animation = Instance.new("Animation")
	animation.AnimationId = "rbxassetid://"..tostring(animationId)
	humanoid.Animator:LoadAnimation(animation):Play()
end

playAnimation(someHumanoid, someAnimationId)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

1 Like

What priority is the animation, first of all.

1 Like

First of all, is the animation under the game you’re currently working on? Second of all, consider keeping the code where you set the animation priority.

1 Like

I have 1 R15 Animation which is at Core and it works. But on the R6 Animations I have tried with Core and Action and none of them work.

Yes, the animation is under the name of the group. What code?

You said in your post that you have tried changing the animation priority, however I can not see this anywhere happening in your code.

He might’ve changed the priority by importing the animation again and then changing it through the editor and then exporting it again.

1 Like

I would like to know how I can change that Animation Priority through a script.

Doing LoadAnimation returns an AnimationTrack. You can use this to change the priority.

function playAnimation(humanoid, animationId)
	local animation = Instance.new("Animation")
	animation.AnimationId = "rbxassetid://"..tostring(animationId)
	local AnimTrack = humanoid.Animator:LoadAnimation(animation)
	AnimTrack.Priority = Enum.AnimationPriority.Action -- I am going to assume you need this Priority
	AnimTrack:Play()
end

playAnimation(someHumanoid, someAnimationId)
1 Like

Okay I will test that out. Is there any animations I should try first?

If I change the limbs’ positions will it not work?

1 Like

Changed them to R15 animations instead.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.