Animations Loaded in Animator but won't play at all

Title is self explanatory. I’m trying to load in a reload animation for my gun framework, however won’t play even if:

  • Priority set to action 1-4
  • Weight set to 1
  • Running in a local script
  • Grabbing animation from a ReplicatedStorage folder

I also have multiple animations running with this as well, but under the 256 limit.

Code:

local reloadType = 1
		
if currentAmmoData.CurrentAmmo > 0 then
	reloadType = 2
			
	charReloadAnim = charWeaponData.charWeaponAnimations.Reload
	VMReloadAnim = viewmodelControl.Animations.Reload
end
		
VMReloadAnim:AdjustWeight(1)
VMReloadAnim:Play()
charReloadAnim:AdjustWeight(1)
charReloadAnim:Play()

I don’t understand why this wouldn’t work, might be seeing this as a bug. To note, I have two weapons with one that plays the reloading animation, but not for the other gun.

Any help is appreciated

Can’t really say for sure what it could be, but maybe try doing some debugging? like print the state of the animationtrack after calling :Play() on it.

I’ve had similar issues before where my animations weren’t playing even with the priority set to action, and then it worked when i changed to core or something other than action, which was weird because actions was supossed to be the top priority… and then it seemed to work after with action priority again which was even weirder. But It was a while ago so i’m probably mixing things up with my bad memory, since it sounds pretty crazy. But you could try testing other settings with your animationtracks.

1 Like

Weirdest thing is, I have a key frame event function connected to the animation track and it runs what code I have in it perfectly fine. Like I have sounds playing without the animation visually playing

I did check and it said the track was playing, my keyframe event function is running, not sure what the problem is.

Maybe the problem could be where you’re loading the animations in the animator.

I may not know anything about how you’re handling the animators of those weapons, but you could be doing some unsafe stuff like destroying unequipped weapons and then it is accidentally trying load those animations in a destroyed animator (? this is just like an example of a possible bug on a possible unsafe way of handling your weapons)

1 Like

I don’t think I’m destroying weapons incorrectly, everytime a weapon is unequipped I’ve stopped the animation track and destroyed it. If I was cleaning up the old weapon incorrectly then the problem would be happening randomly on other weapons.

Idk, maybe it’s a roblox bug

By the way, it is a curve animation.

Idk if this is what you need but here is a snippet from a script I made:

local animationTrack = char:WaitForChild(Humanoid):LoadAnimation(attackANIM)|

animationTrack.Priority = Enum.AnimationPriority.Action|
animationTrack:Play()|

(in a legacy script btw)

Exactly how I’m trying to run the reload animation, won’t work

Is the animation saved under the correct group/user? You might not have permission to use the animation and will need to reupload it in the correct place.

Yes. I’m working under a group and the animation assets are saved there, and I’m trying to play them in that group’s game.

Also for some more details, it is a curve animation. I experimented with a test non-curve animation and it worked, so the issue may perhaps be on Roblox’s side?

1 Like