Loading an animation with a seat not working

Hello,

I made an animation for my future Showcase, the problem is;
I made an animation, who I want it to be loaded when the character is sitting on a seat, the problem is it doesn’t work, I searched in the Developer hub, tried a few improvements, but still not working.
Here’s the script:

local seat = script.Parent
local Anim = seat.sitanim


seat.Changed:Connect(function(property) 
if property ~= "Occupant" then return end 
local occupant = seat.Occupant
if occupant then 
local character = occupant.Parent
while character.Parent == nil do
character.AncestryChanged:wait()
end
local humanoid = character:WaitForChild("Humanoid")
local animationTrack = humanoid:LoadAnimation(Anim)
animationTrack.Looped = true 
animationTrack:Play()
end 
end)

I’ll really appreciate if someone can help me.

Is the animation priority level above core?

1 Like

I did not know there was an Animation Priority-
I fixed the animation, it work now, thanks for your help.

1 Like