Can you load one animation on multiple humanoids? (animator:LoadAnimation()) also this is on the server. I know you can on the client.
How do animations clean up? If I make a new animation and load it then play the track but I lose reference to it will it clean up or do I have to destroy it.
I don’t know much about animations but can’t you just loop through all the humanoids and then load the animation for each humanoid?
local Characters = ...:GetChildren() --assuming characters are in a group
for _, character in pairs(Characters) do
local Humanoid = character:WaitForChild("Humanoid")
Humanoid:LoadAnimation()
end
local Chars = {Character1, Character2} or ...:GetChildren() -- Table containing Characters, or you can set this variable to getting the children of an instance, choose one of these depending on what you're trying to accomplish
for _,character in Chars do
local humanoid = character.Humanoid
local track = humanoid:LoadAnimation(animationInstance) --replace animationInstance with your animation
track:Play()
end
Yes, you can do this. The animation is just a template to make an AnimationTrack. If you want the same AnimationTrack to control two humanoids, you can’t do that.