local Animation = script.Parent.Animation
local Humanoid = script.Parent.Humanoid
local LoadedAnimation = Humanoid:LoadAnimation(Animation)
LoadedAnimation:Play()
you call :LoadAnimation() on the animator, it’s only deprecated on humanoids, and it will actually replicate more reliably according to documentation (which is the whole reason it got deprecated in the first place)
local Animation = script.Parent.Animation
local Animator = script.Parent.Humanoid.Animator
local LoadedAnimation = Animator:LoadAnimation(Animation)
LoadedAnimation:Play()
Since some people are arguing about using the humanoid or the animator instance, when you speak of “deprecated”, it means it’s no longer supported or updated on.
The animator instance also only replicates if it was added from the server side and not the client side or unless if you inserted it in manually.
So the difference is that animator is more stable and can replicate and can play animations instantaneously without worrying having to play it all at once in the server sided to make it play for everyone, while playing it in the humanoid doesn’t replicate (unless if it’s on a server sided script, correct me if i’m wrong) and is no longer supported.
So i prefer using the animator instance to load and play animations on rather than humanoid or animation controllers so it’s more smoother and stable.