Integrating looped animations NPCs(FE)

I want to make an npc play a looped animation, how would I go about doing this? I’ve read developer hub articles and checked scripting helpers however, these are either out of date or just simply don’t work. Either I don’t understand them or they just generally don’t work.(Other tutorials don’t really make it easy to understand how I’d make this happen automatically either. I don’t want this done when a certain criteria is met unless you can make it so it’ll only happen once it’s moved to the local character)

Breakdown: *create a server script that plays a looped animation I made with the animation editor for an NPC(Filtering Enabled compatibility)

Animation itself is already made all I need now is the server script to integrate the animation into a script that runs with filtering enabled and everyone on the server can see.

2 Likes

Insert this into the Humanoid of the NPC.

local Humanoid = script.Parent

local Animation = Instance.new('Animation')

Animation.AnimationId = ""

local LoadedAnimation = Humanoid:LoadAnimation(Animation)

LoadedAnimation:Play()
3 Likes

How would I make this loop so the animation has no end? Animation tracking…right? I tried Animation.Loop = true and also tried LoadAnimation.Loop = true, neither worked.

load the animation and then press this

3 Likes

Didn’t know that was a setting. Relatively new to animations, thank you for the help! I should probably mess around with the animation editor before asking for something like a loop next time…

2 Likes