Animation problems

local Players = game:GetService("Players")

local function onCharacterAdded(character)
   -- Get animator on humanoid
   local humanoid = character:WaitForChild("Humanoid")
   local animator = humanoid:WaitForChild("Animator")

   -- Stop all animation tracks
   for _, playingTrack in pairs(animator:GetPlayingAnimationTracks()) do
   	playingTrack:Stop(0)
   end

   local animateScript = character:WaitForChild("Animate")
   animateScript.run.RunAnim.AnimationId = "rbxassetid://12909454732"
   animateScript.walk.WalkAnim.AnimationId = "rbxassetid://12909454732"
   --animateScript.jump.JumpAnim.AnimationId = "rbxassetid://"
   animateScript.idle.Animation1.AnimationId = "rbxassetid://12908517075"
   --animateScript.idle.Animation2.AnimationId = "rbxassetid://"
   --animateScript.fall.FallAnim.AnimationId = "rbxassetid://"
   --animateScript.swim.Swim.AnimationId = "rbxassetid://"
   --animateScript.swimidle.SwimIdle.AnimationId = "rbxassetid://"
   --animateScript.climb.ClimbAnim.AnimationId = "rbxassetid://"
end

local function onPlayerAdded(player)
   player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end

Players.PlayerAdded:Connect(onPlayerAdded)

So as you can see I have a basic script that changes the player walk and rest animation. As it were, in Roblox Studio I have everything working.

But as soon as I go into the mode itself, the animations just don’t work. What’s the problem? The script global is in serverscriptstorage.

1 Like

Do you set the animation priority to Core?

1 Like

How’s that? I’m just replacing animation for the first time and may not understand some things, sorry)

1 Like

For the animations you used, if you made them, in the animation editor under the three dots, you will see something called “AnimationPriority”

Normally, for anything like tools or any other animation like crouching, you’d want to set it to “Action.” However, for custom movement animations, you’re going to want to set it to “Movement.”


If they are your own custom animations, then check the animation priority. It can be changed from the animation editor or from a script, but since you’d already be that far into checking it, then just change it there and republish the animation. If you overwrite the asset (which is recommended), you won’t have to switch out the asset ID, but if you publish it as an entirely new animation asset, you will have to change the ID

So I have to open the animation and find a button there to give priority to the animation? Then publish it and replace the id, right?

Yeah,right.

That is correct. But you can change it via script as well using Animation.AnimationPriority = Enum.AnimationPriority.ABC

Just of course change ABC to the animation priority you need, which would be Movement in this case.

It will have the same effect either way you do it

I’ve seen some other people have the same problem, and I think it might be a bug. Try reverting the version of the animation to a version before 2023 or create a new animation.

The problem is that I have this on all animations. As if they work in Studio with me, but if my friend comes in, they will not work with him

Do I have to do this? If so, as you can see an error occurs. And can I please have an example of the script?

You need to do it with Track like that:

Track.Priority = Enum.AnimationPriority.Core
1 Like

That sounds like a permission issue. Did you make the animations? If so, you need to upload them to group.

I think you need to recrate animation script to do it.

I created this animation, uploaded it to my account, copied the id and pasted it into the script

Is your game owned by you or a group?

Try to change ABC to Core. I think it won’t help but try it.

The game belongs to my group, why?

Track.Priority = Enum.AnimationPriority.Action

ABC is not animation Priority, this is just example. Change it to Action As I said above

And it seems to me that animations should not be on the server, but on a local script.