Animation script Isnt working

I have a custom character model and rig and I made this script to have an animation play all the time but the animation doesn’t seem to work.

image

I have tried using AnimationTrack and loading the animation there I have tried Humanoid and loading the animation there doesn’t seem to work either.


local humanoid = script.Parent.Humanoid

local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/asset/?id=12823585784"
local animationTrack = humanoid:LoadAnimation(animation)
animationTrack:Play()