Deprecating LoadAnimation on Humanoid and AnimationController

BEFORE:

local Controller = script.Parent.Humanoid
local Animation = Controller:LoadAnimation(Animation)
Animation:Play()

AFTER:

local Controller = script.Parent.Humanoid
local Animator = Instance.new("Animator")
Animator.Parent = Controller
local Animation = Animator:LoadAnimation(Animation)
Animation:Play()

I know the reasons, but this is not saving time in my opinion? (Sorry if I didn’t understood the post well, I BELIEVE…)

9 Likes

I was extremely confused on the terrible replication animations had but never was aware of Animator instance, thanks for this update however.

3 Likes

I may be missing something and forgive me for this,

But now how would we load an animation to a Humanoid in game?

I. E. Player wields a weapon with a custom hold animation. How would this now be loaded?

3 Likes

Humanoid:LoadAnimation() had issues with replication, this is a nice change other than the fact Humanoid:LoadAnimation() is basically in every animation script.

2 Likes

i have seen a bunch of scripts that use this, so i think it might be hard to replace it because it would take a long time if you have a lot of code.

2 Likes

i personally dont see the problem with this as you can literally just add “Humanoid.Animator:LoadAnimation()” and bam its fixed

6 Likes

If we were to use this new alternative for animating now, would it work? I’m trying to make an Animator as stated and having the client :WaitForChild() on that Animator, but even without that code, the character spawns with an Animator to begin with. How can I verify that the client is correctly referencing the Animator generated by the server, and not the client-generated Animator?

3 Likes

If I’m not wrong there could be only one animator per humanoid, I’m not 100% sure but great question though.

By the way where does the client-generated Animator came from?

1 Like

Great now i have to re-write everything up for my upcoming game.

2 Likes

No it was the most unneccesary thing that was in studio.
Why did we have to do Humanoid:LoadAnimation() instead of directly playing it.
I think this is a good update. Its neccessary.

1 Like

I kind of prefered the load animetion. Yes it is Better but I prefer to have the animation loaded up before playing.
Btw soz i went to get some breand and tea

3 Likes

Idk everyone has a different opinion on this.
All i can say is that Roblox updating the syntax is normal as they are upgrading stuff.
Preparing for stuff like this to happen is the best u can do.

1 Like

i guess so. I just hope that it doesnt affect my game

1 Like

I mean Constant Updates can litterally affect how commitied a dev can work on their game. I think Roblox should bulk them all together and release them Like every 6 or 4 months.

2 Likes

@focasds It’s not made to save time.

3 Likes

As far as I know, it’s being automatically generated whenever I spawn in, in Studio. I’m not entirely sure how, are characters by default supposed to not spawn with an Animator? It might be one of my tools, I will go check later.

1 Like

Yeah, I’m spawning in with no tools and already, I find an “Animator” in my character’s humanoid. You did say the “Animate” localscript will be updated soon though, right? That might be why, I’m not entirely sure

1 Like

This just seems useless. I get raycasting and everything but this is just deprecating with barely a reason. But at the same time this is actually SUPER simple to replace soo…

1 Like

It’s simple, instead of humanoid inside humanoid there is a instance named “Animator” so just instead of loading the animation to the human it’s animator

For example how it would be loaded on a humanoid on a localscript:

game.Players.LocalPlayer.Character:WaitForChild("Humanoid"):WaitForChild("Animator"):LoadAnimation(script.Parent.ExAnimation)

Hope this helps!

2 Likes

You should only have to create the animator once, and just use that animator in other scripts. In that case, it would look more like

local Animator = script.Parent.Humanoid:WaitForChild("Animator")
local Animation = Animator:LoadAnimation(Animation)
Animation:Play()
2 Likes