Issues with HumanoidDescription

Uh… Placed two dots when there should be one.

Thats the error in output, if you take a look at the code I provided above, you wouldn’t find it there.

Nope, roblox bugging. Also if u added my script. That error should be gone. I tried it on my own.

The other sentence is meant to be reacting to PRemedius.

I copied the code 1:1 and I still had the same error. Were you able to change the animations by any chance? If so, can you post the code again just in case something was changed in your script?

No, I could not. It ais there was an asset error. Maybe take a look at the ID? And make sure the animation is under your account.

It is, I’ve checked multiple times and have even tried different ID’s. Nothing works.

Hmmm… Then I don’t know a solution sorry.

No worries, thanks for the help.

You can still change those Screenshot by Lightshot

1 Like

It wouldn’t work, from what I remember the AnimationId inside the Animate script also needs to be changed, correct me if I’m wrong.

from looking at your code, everything seems to be ok, I think your issue is the fact that your animation id is a custom one instead of an animation from one of ROBLOX’s animation packs, try using an animation from on of the buyable animation packs in the catalog, if that doesn’t work, I suggest just changing the local animate script’s animation tracks manually

Yea the ROBLOX animation packs from the catalog don’t work either.

Also, just for extra clarification, I’m trying to find a way to change the default walking and running animations mid-game, therefore I’d like to avoid overlapping animations just to update a basic default animation.

If you have any other alternatives, please let me know.

@colbert2677 cont.

Please let me know if I have the right idea: The model needs to be uploaded and the ID that correlates to the model is used rather than the animation ID.

My first question is how would I differentiate between an idle animation from a walking animation if both animation id’s are in the same model?

This is correct, yes. I did make a bit of a mistake while explaining how to upload the animations though, so I’ll take the time to re-explain here and correct my mistake on another thread of the same nature. The setup is a little confusing and undocumented, had to fumble around with it a bit.

There is a process you must follow for every animation override you want to apply to the Humanoid using HumanoidDescriptions. For example, let’s say I want to change the walk and run animations. I do the usual creating of two animations and publish them, that’s straight forward. Then, those ids are fitted into Animation objects and put into “containers” of sorts. These follow the same layout as the ones you can find in the Animate script. These are then put into an R15Anim folder and uploaded to the site.

image

So for each type of animation I’m replacing (walk and run), there’s an R15Anim folder. In them is a container and in the container are my animations. They should match up the same way the Animate script does it, as I explained before. The folders must explicitly be named R15Anim.

When you have this down, you upload each of the folders separately. With the id you get from publishing the folders to the website, you use these as the ids for the HumanoidDescription’s animation fields. The HumanoidDescription will take care of the rest in terms of replacing the animations.

In case you need help seeing exactly what I did, I’ll attach my working space below. It contains the R15Anim folders you need to upload to change walking and running animations. All you need to do is add the ids to the Animation objects, upload, copy the ids and then use them for your HumanoidDescriptions.

R15Anim Folders.rbxl (21.6 KB)

Might make a bit of a tutorial to expand on use of HumanoidDescriptions and correct some wrong knowledge I’ve provided to other developers.

15 Likes

Oh my god, thank you so much. It worked perfectly.

In case I want to do the same thing with R6 animations, would I just change the “R15Anim” name to “R6Anim” while following the same process?

Also, how expensive is this? Can I turn this into a function and call it whenever a player equips a tool?

Unfortunately this method will not work with R6 animations as far as I’m aware since there are no custom animations for R6. HumanoidDescriptions expect to take apart a folder named R15Anim. In the case of R6 animation changes, you would probably have to modify the Animate script directly.

This is very inexpensive to run. The engine handles the animation changes for you quickly and in the background. Feel free to do it as much as your game needs them.

Great, thank you so much once again. I really appreciated your help.

One last question, are there any other better alternatives to changing the default animations mid-game or is this the most effective method?

Any method that fits your game’s systems is decent enough to work. For something like changing animations I would just make my own edits to the Animate script so it can accommodate my use cases, since I don’t normally use HumanoidDescriptions to change slight parts of characters (I’m either modifying an existing appearance or completely changing it).

1 Like

Hey,

I have been trying to apply this fix but it just doesn’t seem to work.
The only difference in my game is that I am trying to apply it to NPCs that are client sided.

I have done the exact same thing, uploading a folder named R15Anim with the structure just like in the Animate script. I even made the models themselves public on the Roblox website and it still doesn’t work.

I just get the same warning over and over again without the first error that Premedius got.

So I get this:
image
Without this:

Asset id 5671454392 should reference a Folder Instance named R15Anim - Studio

Is there any possible way I could fix it? If you know the answer please let me know, I’d be very appreciative.