----[PLS URGENT]--- Animation:Play no working just in my game

I was adding an animation to my game, when I add the animation it doesn’t work, that’s why I decided to try it on a baseplate and it did work. This is the script:

local anim2 = script.Animation

wait(5)

local player  = game.Players.LocalPlayer
local char = player.Character
local hum = char.Humanoid


local BirdAnimationTrack = hum:LoadAnimation(anim2)

while true do
	wait(1.35)
	BirdAnimationTrack:Play()
end

https://gyazo.com/62e41a6769afffab8d8b64c9e6f11ea7
In the baseplate it works for me, but in my game it doesn’t
(The other animations of my game if they work correctly)

image

Make sure that the animation you’re using is compatible with your character type like r6 or r15

My game is r15 and the animation too

Check if this works, I did typed this quickly so I don’t know whether it’ll work or not

-- Services
local PlayerService = game:GetService('Players')

-- Variables
local Player  = PlayerService.LocalPlayer
local Character = Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild('Humanoid')
local BirdAnimation = script.Animation
local BirdAnimationTrack = Humanoid:LoadAnimation(BirdAnimation)

-- Play
BirdAnimationTrack.Looped = true
BirdAnimationTrack:Play()

In the baseplate the animation is not reproduced

The animation might be being over written in your other game. Does your other game have other custom animations?

Yes, it has custom animations.

I’d compare the priority of the animation you’re trying to add and the custom animations already in your game.

1 Like

If this is meant to be a walking animation then you could fork out the animation scripts from your character and replace the walking animation id with the animation you want

@PersonifiedPizza @jumpyfunk https://gyazo.com/62e41a6769afffab8d8b64c9e6f11ea7
this is the animation, sorry i’m using translator

1 Like

No worries. Each animation has a priority, which allows it to over write animations of a lower priority. The animations already in your game might have a higher priority than the one you’re trying to add.

https://developer.roblox.com/api-reference/property/AnimationTrack/Priority

If you look at the priority of each animation, you can verify that the priorities are correct.