How should I play animations for my fighting game

  1. What do you want to achieve? Keep it simple and clear!
    I want to know how I should play animations for my fighting game.

  2. What is the issue? Include enough details if possible!
    What I thought about doing was playing my animations on the server and having Roblox automatically replicate them to the client. But I feel like that isn’t a network efficient idea. And it also takes away some control.

  3. What solutions have you thought of so far?
    Fire a remote event with the animation name and humanoid, and go into replicated storage from the client and get the animation, then play it for that humanoid.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

Should I do this, is it just better to play it on the server? Thanks

1 Like

I recall that playing animations on the client is much better, as it takes up less server resources and other stuff like that,

If you play an animation from the client, on their character, every other player will be able to see it cause of Network ownership :]

1 Like

I know that, here’s what I’m trying to say.

Should I do this?:

Player 1 clicks to do an attack
The server gets this request, then plays an animation on the server which replicates to all the clients

or?:

Player 1 clicks to do an attack
The server gets this request, then tells every client to play the animation on their side
This means player 2 plays the animation for player 1 on player 2’s client

I’m not playing animations on the client that does the animation, because I don’t want desyncing issues. So player 1s punch wont play on their device until the server gets it and tells them to play it.

Hmm thats a good question, I wouldnt do it on the server, so if you had to pick between them I’d say option 2.

At the same time I wouldnt do option two, but it depends how your combat is structured, so maybe it is the better option.

Is there a way to play an animation on the client without it replicating to the server?
because doing it this way would also make the players client play the animation on its on character sometimes

Not that I would know of, you could always try searching though