Odd Issues with Animation Loading / Replication

Hi, everyone. First post here - and I’ve got a problem I’ve been headbutting for the past few hours.

I’m attempting to load animations onto my character’s humanoid, and I’m getting a consistent result; the animations aren’t playing. At first I assumed that the problem occurred because I was creating the Animation objects themselves client-side, but after re-initializing the localscript either by changing classes or resetting I received an error:

This error persists if I choose to instead create the objects from a serverscript and call LoadAnimation on them from the client. Stranger still, I played around with disabling scripts or commenting out chunks of code to dig to the root of the problem, and if I refrain from cloning certain scripts to the character’s class folder (which contains the core scripts) the issue desists. If I add a nominal wait time to the beginning of the class localscript before I call LoadAnimation (anywhere from 0.5 to 1s), the issue desists. The only commonality between the cloned scripts and the class script is that they both reference the player’s character and humanoid (CritBehavior, HPBehavior, StateBehavior).

image

Moreover, even when I perform the above workarounds necessary to cause my animations to load and play correctly, they do not replicate to the server when I utilize the Test Server mode in studio. I’ve read everywhere that this behavior is not intended and that animations can be played client-side whilst still replicating to other players.

I’ve done some digging into the topic and many similar threads suggested that the character and humanoid can exist without actually being part of the datamodel, and I tried the code they provided that they claimed fixed this particular error, to no avail. I’ve also tried waiting for the Animator object after first calling LoadAnimation, and the script proceeds as if one was created, despite the explorer showing I clearly have an empty humanoid.

If anyone’s encountering a similar issue or knows a fix, I’d appreciate your help. Thanks!

1 Like

This topic was automatically closed after 1 minute. New replies are no longer allowed.