while char.Parent == nil do
char.AncestryChanged:wait()
end
from TheGamer101 at Getting error "LoadAnimation requires the Humanoid object to be a descendant of the game object" despite waiting for Character - #2 by TheGamer101
havent tested it out but it should probably work (char should be player.Character)