How to animate 2 characters and play it in-game like a takedown animation

Absolutely love this.

I myself haven’t gotten around to diving into Moon animator; I’ve just stuck with the default one. However, a game I’m working on will require animations of two rigs and this tutorial could not of popped up at a better time. For your first tutorial this is amazing and I hope to see more animation tutorials from you in future!

11 Likes

You can use additional Motor6D Connecting first character to second

6 Likes

Really amazing tutorial! But…

You should probably use

mainChar.Humanoid:WaitForChild("Animator"):LoadAnimation(animationFolder.yourAnimName)

Since, Humanoid:LoadAnimation()'s deprecated, don’t think it’ll be a good idea to put deprecated functions in a tutorial. Still an amazing tutorial!

11 Likes

and now you just need to add damage to it and it would be perfect

5 Likes

Animator are made so that it can replicate animation from client to server (from what it says on the api)
which mean that if playing animation on the server there is no need to use animator as it only handle replication between client and server.
playing the animation via humanoid:loadAnimation on the server would definitely replicate it to all client
so thats why i put humanoid:loadAnimation there.

9 Likes

“Never stop learning”

Something I always heard, and was always true. Really good to know this! Thanks!

7 Likes

i want to ask something
all most all the scripters says to play animation(and vfx in general) on local so why did you choose to play it in the server?

3 Likes

I thought about if for couple of mins if someone can confirm will be appreciated
its depend on the situation the animations are used if they are used only on players i think you should do it locally.

But that is not always the case lets take for example a game with npcs since npcs dont have animator their animation is serversided (most of the time) and u need to do it serversided so it will work on both sides (players and npcs)

2 Likes

how like connect two humanoidrootparts ?

2 Likes

Because you cannot animate health, you would have to script it.

The moment the animation plays, add this to the script:

task.wait( --[[Time until character is hit]] )
mainChar.Humanoid.Health == mainChar.Humanoid.Health - How much damage

you can repeat it again if that character gets hurt or another gets hurt.

2 Likes

How would you go about exporting the animation of the camera and playing it too?

I want to use Moon Animator instead of hand scripting it because it takes less time and hand scripting might not always look good

1 Like

I know how that works you don’t need to explain that to me. I never even asked for it.

1 Like

does it work on a real player???

1 Like

When I tried implementing a takedown animation for two players I get a delay on one of them. Does anyone know how to prevent this?

1 Like

Play the animations at the same time, if you aren’t already.

1 Like

After loading the animations I play it at the same time which matches on the server, but not the client initiating it.

1 Like

That’s strange, can you show a video clip so I can see what’s desynced? I might be able to see what’s going on from there.

Server Script:

    local exerAnimator = exerHum:FindFirstChildOfClass("Animator")
	local larryAnimator = larryHum:FindFirstChildOfClass("Animator")
	local exerTrack = exerAnimator:LoadAnimation(infoMod.swingComboFinExec)
	local larryTrack = larryAnimator:LoadAnimation(infoMod.swingComboFinLarry)
	repeat task.wait() until ((exerTrack.Length > 0) and (larryTrack.Length > 0))
	larryTrack:Play()
	exerTrack:Play()

Is it normal to have a slight delay between the client(right) and server(left). That’s why you also see a hitch for the knockback because it relies on a keyframe to do the knockback which is what i’ve been trying to fix

For some reason it seems like the client happens a little too fast, but that’s weird because it’s played on the server.

1 Like

Try loading it into the humanoid instead of the animator as a quick test and see if there’s still delay because I have no clue what’s going on there…

2 Likes

Still no, I’ve even changed the network ownership of both the roots to be that of the server (not sure if this is good anyways).

1 Like