local par = script.Parent local idle1 = Instance.new("Animation") while true do idle1.AnimationId = "rbxassetid://4508495460" wait(3) local control = Instance.new("AnimationController", par) local animationTrack = control:LoadAnimation(idle1) animationTrack:Play() end
I'm trying to get this to play an idle, it's priority is set to action rn, I do own the animation, and I'm trying to get it to play on an NPC. I took the script right from https://developer.roblox.com/en-us/articles/using-animations-in-games, so anyone have a single clue what's wrong here?
Why are you loading an animation in a while true do loop? Playing it if it has the loop ticked (when you you were in animation editor) should keep it running for as long as you need it to.
local animation = Instance.new('Animation') animation.AnimationId = 'rbxasetid://0' -- change to animation id local track = Humanoid:LoadAnimation(animation) track:Play()