Client - Client communication - Parry Indicators

So I want to create a way for the clients to see a little VFX when a specific “marker” is reached using :GetMarkerReachedSignal(). And I’m using this

task.spawn(function() -- On the client
    IndicatorConnection = Track:GetMarkerReachedSignal("Parry"):Connect(function()
        Event: -- fireserver()
    end)
end).

What I want to happen is that the RemoteEvent fires then the Server fires to all clients which then Emit the VFX. But the problem is that would take too long as a ParryIndicator/the animation is too quick compared to the ~100ms + it would take. I know Deepwoken has this fixed but I’m not sure how they do it

use BindableEvent for client-client (and server-server)

I thought BindableEvents on the client only communicated between the same client from LocalScript → LocalScript

yes it does.
could you elaborate more on your use case? what is animating, and firing the marker event in the first place?

When the Animation reached the marker I want a VFX to emit on all clients with as little to no delay as possible

what i mean is. it is very different if a player fire that event to all other players. or an npc fire that event to all players

When a player M1s/Punchs I want it to Fire to all other clients

You could use a remoteEvent and fire all clients on the server, however the delay depends on the player’s Ping.

ok so we want to parry another player.

my first go to is trying to get the marker signal from another player’s animator locally.
i have done some research, and it seems we cannot get another player’s animation signal directly because we can only get an AnimationTrack from animator:LoadAnimation()

it seems not likely that the server can receive that marker signal, or Animator.AnimationPlayed event

but we could send a remote event to server along side when we play the M1 animation,
hopefully the event would reach server around same time as the animation replicates. we will then FireAllClient(thatPlayer, whichAttackOrAnimation, workspace:GetServerTime())
on our local player receiving this information, we also use GetServerTime() to compare with the received server time to know the elapsed time. and from the whichAttackOrAnimation, we might get from a config file that say when the parry window is. and then do the local vfx based on elapsed time

I don’t understand how this would solo the problem since time still elapsed when the client sent the event to the server and server sent to the clients.

if you send event when server received the animation event, then it is (animation event time + ping time) after client received it

if you send event at animation start, then it is min(animation event time, ping time) when client received it

for example. say, the parry is 1 sec after the animation start, and ping time to client is 250ms
if you send it when server has parry animation event, then client received it at 250ms after parry animation should start.
if you send it at animation start, client received at 250ms, and then client know to start parry after 1 sec. so it is on time

i just found this. seem we can listen to animation event in client

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.