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

LoadAnimation requires the Animator object (Animator) to be a descendant of the game object?

Asked by 5 years ago
Edited 5 years ago

Okay. I want to create a chest and I would want create animation for this. But my chest not move and in the OutPut I recevied this message

Error:

10:21:24.366 - LoadAnimation requires the Animator object (Animator) to be a descendant of the game object

the rest:

10:21:24.367 - Stack Begin 10:21:24.367 - Script 'Plugin_-1.Project.AnimationEditorLuaWidgetsVersion.Code.DataModels.DataModelPlayState', Line 103 - upvalue loadAnimation 10:21:24.368 - Script 'Plugin_-1.Project.AnimationEditorLuaWidgetsVersion.Code.DataModels.DataModelPlayState', Line 165 - method recreateAnimationTrack 10:21:24.368 - Script 'Plugin_-1.Project.AnimationEditorLuaWidgetsVersion.Code.DataModels.DataModelPlayState', Line 197 - local callback 10:21:24.368 - Script 'Plugin_-1.Project.AnimationEditorLuaWidgetsVersion.Code.UtilityScripts.UtilityScriptEvent', Line 61 - method fire 10:21:24.369 - Script 'Plugin_-1.Project.AnimationEditorLuaWidgetsVersion.Code.DataModels.DataModelClip', Line 52 - method setLength 10:21:24.369 - Script 'Plugin_-1.Project.AnimationEditorLuaWidgetsVersion.Code.AnimationEditor', Line 233 - global exitPlugin 10:21:24.370 - Script 'Plugin_-1.Project.AnimationEditorLuaWidgetsVersion.Code.AnimationEditor', Line 253 - upvalue onEnableChanged 10:21:24.370 - Script 'Plugin_-1.Project.AnimationEditorLuaWidgetsVersion.Code.AnimationEditor', Line 309 10:21:24.370 - Stack End

Why? I have create Motor6D in my part to create a attachment. Here to view "Gyazo GIF"

Pluging view

So why I don't could create a animation?

0
Is there a humanoid and HRP in the model? ABK2017 406 — 5y
0
It seems like something is removing the animator object or it's not being created. You could try premaking an animator object and parenting it under the AnimationController: https://www.robloxdev.com/api-reference/class/Animator. One place to find it is in the player's humanoid once an animation is played. magicalmariomario 0 — 5y
0
Ok? So I want CREATE a animation. Not use a animation. NiniBlackJackQc 1562 — 5y

1 answer

Log in to vote
0
Answered by
ABK2017 406 Moderation Voter
5 years ago
Edited 5 years ago

This has come up before, EchoReaper had some workarounds that should work...

“The problem here is that the DataModel (“game” object) isn’t global, and since services are parented to DataModel, you can’t use services without having a DataModel. LoadAnimation and a number of other API members need one or more of those services, so they can’t function without a DataModel either.

I wish this weren’t an issue because parent restrictions like this require hacky workarounds (e.g. I have to either parent entities to workspace as soon as I create them to load animations instead of letting the script that created them do the parenting, or have the scripts ask the entity to set its own parent where I can load animations there.), but I guess we’re stuck with it for now.”

The suggestion solution for the above problem was to add (the example uses character, which of course would need to be defined earlier.)

while char.Parent == nil do
    char.AncestryChanged:wait()
end
0
I absolutely did not understand NiniBlackJackQc 1562 — 5y
0
He’s basically saying that error is thrown because the humanoid isnt a descendant of the game object, even though the humanoid is there, and sometimes even if you “Wait” for it... ABK2017 406 — 5y
0
I just saw your above comment, so you haven’t created the animation yet? If so then my apologies, I thought you were getting the error when trying to load it.. ABK2017 406 — 5y
Ad

Answer this question