Animation not playing in Studio

Diagnostic Notes -

I am currently creating a gun FPS in which I replicate animations casted from a local script to hopefully cast into the server script.

  • I first, used referenced my animation through an instance and then added the Id.
  • I then attempted to play the animation through the use of the player’s humanoid in which it did not play at all.
  • I further then decided to use the player’s animator, but still got the same result.
  • With process of elimination, I assumed that the animation was of error.
  • I changed the priority to Idle, Action and even Core and it still did not work.
  • I further changed the instance into a normal animation property, but nothing has worked.

Segment of debugging -

wRemotes.initWeapon:FireServer(weapon, vModel);

wait();
local holdAnim = Instance.new('Animation');
holdAnim.Parent = weapon;
holdAnim.AnimationId = 'rbxassetid://7116896720';
local animTrack = humanoid:LoadAnimation(holdAnim);
animTrack:Play();

Segment of Algorithm -

  1. Send weapon to server to set up a motor6d.
  2. Initiate the animation and play. – Not working.
1 Like

Update

I have tried a couple of other methods, but none seem to work.

1 Like

UNSOLVED

My issue is still unsolved.

humanoid:LoadAnimation() is deprecated

Try using:

local holdAnim = Instance.new('Animation');

holdAnim.Parent = weapon;

holdAnim.AnimationId = 'rbxassetid://7116896720';

local Humanoid = Character:WaitForChild("Humanoid")

local Animataor = Humanoid:WaitForChild("Animator")

local animTrack = Animator:LoadAnimation(holdAnim);

animTrack:Play();
1 Like

Hello,

I really appreciate your help, however it seems to have not worked - it just does not animate the character.

Are you doing this with a LocalScript or a normal one?
Where is the script located?

1 Like

I am using a local script located in the StarterPack

Try to put the script on StarterCharacterScripts:
image

1 Like

I have tried most solutions, as stated in my first post, but none seems to have worked unfortunately.

I have no idea if it is a replication problem or if it is a studio problem.

Hmm… Does it gives any errors? Also have you tried to test it on Roblox Player?

1 Like

No scripting errors from my debugging and it works neither in studio nor player.

I checked the animation id, but nothing seems to be out of the ordinary.

What’s the animation priority?

Info: AnimationTrack | Roblox Creator Documentation

1 Like

Hello Ben,

The track priority was Core.

Okay, animation priority is essentially the level of animations that play.
Core level is all roblox animations.
Idle is higher,
Movement is higher,
And Action is higher.

Change the priority of the animation from Core to Idle, or else roblox animations will over ride the animation, as it doesn’t have a high enough priority.

1 Like

Hello,

Thanks for alerting me about the priorities. I have changed the animation from Core to Idle, however it is still not playing.

This is what I have got so far:

Script [decoy]:

Explorer:
image

Animation Priority:
image

Error:

Have you saved the new set animation as the one you’re using?

1 Like

I changed the configurations then exported it directly

Where exactly is this game located? Since you uploaded the animation to your profile, it will only play in your games.

1 Like

I know that, however it does not seem to be replicating at all.

Is it a matter of my animation not working or roblox not working?