The Local Script is in StarterPlayerScripts, the id of the animation is in the animation.
The Error is: LoadAnimation requires an Animation object
Anyone may have any idea what am I doing wrong, I followed a youtube tutorial
wait(3) local BirdAnimation = script.Parent.animation local player = game.Players.LocalPlayer local char = player.Character local hum = char.Humanoid local BirdAnimationTrack = hum:LoadAnimation(BirdAnimation) BirdAnimationTrack:Play()
they recently deprecated this feature, so you'll have to do it this way
wait(3) local BirdAnimation = script.Parent.animation local Player = game.Players.LocalPlayer local Char = player.Character local Hum = char.Humanoid local BirdAnimationTrack = Hum.Animator:LoadAnimation(BirdAnimation) BirdAnimationTrack:Play()
You will have to include the "Animator" in the humanoid as well.
TIPS
When its an NPC, Insert an "AnimationController" and replace the "Animator" in the script with "AnimationController" because NPC's Naturally don't get animators
Also, this feature can be used in ServerScripts!