Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

LoadAnimation requires the Humanoid object to be a descendant of the game object?

Asked by 4 years ago

Hi, I have been making a shotgun, and decided to make custom arms (just duplicated the torso + arms + root + humanoid into a model) and got this error: LoadAnimation requires the Humanoid object (Arms.Humanoid) to be a descendant of the game object

I have no clue what this means and was wondering if I could get help with it

LoadAnimation Function (errors on line 4):

local function LoadAnimation(anim)
    if anim.AnimationId ~= "" then
        repeat wait() print("Finding Humanoid") until script.Parent.Parent:FindFirstChildOfClass("Humanoid")
        return Arms.Humanoid:LoadAnimation(anim)
    end
end

It errors whilst trying to load the first animation on this line

local Idle = LoadAnimation(script.Parent.Idle)

The "Arms" model is parented in the tool, in the character

Answer this question