This is deprecated. Just load your animation on the animator, read here.
animator:LoadAnimation()
Example:
local animator = humanoid:FindFirstChildOfClass("Animator")
if animator then
local animationTrack = animator:LoadAnimation(animation)
animationTrack:Play()