LoadAnimation requires the Humanoid object to be a descendant of the game object (?)
Asked by
4 years ago Edited 4 years ago
ok this error has been coming up for soo long:
LoadAnimation requires the Humanoid object (DragonSpawner12.Humanoid) to be a descendant of the game object
Here is my code:
1 | local player = game.Players.LocalPlayer |
2 | local char = player.Character or player.CharacterAdded:Wait() |
3 | local humanoid = char:WaitForChild( "Humanoid" ) |
5 | local anim = Instance.new( "Animation" ) |
7 | local animation = humanoid:LoadAnimation(anim) |
I HAVE SEEN SO MANY ARTICLES NOT SOLVING THIS!
PLEASE Help me!
Edit: thanks for the inspiring comments