Replicating Animation Events to all clients

Hey ya, so there are visual effects and sounds that I want to play during a certain threshold through animation tracks that replicates to all clients without the use of RemoteEvents, checks within the server or creating/using animation tracks from the server

Right now the way I handle it is by simply making a thread to not yield the function for what I want to do, I really do not like this method at all and it makes it difficult to get the right time of the animation tracks to get the effects you want more accurately, also this is just bad practice..

task.defer(function()
	task.wait(0.05)
	sounds.ScytheStartup:Play()

	task.wait(0.3)

	attacktrail.Enabled = true
	sounds.ScytheLight:Play()
end)

If anyone knows a workaround for this then it’d be VERY appreciated, I know that a fully safe way to do this is not possible but I’d like the one that wouldn’t put too much work on the server.

There is no work around for this, unless you load and play the animation on the server and setup the animation event stuff there. (and fire remote events to all clients when the marker is reached) Usually people do it the way you’re doing, or setup a system where when a marker is reached on the client, it sends a remote event to the server and then the server sends the event to everyone else except the original client playing the animation.

2 Likes

Why cant you just connect :tm: animation marker events on client individually?

1 Like

The best approach if you don’t want to use Remotes imo, you can also just play the sound and effects on the server if you are on the server-side already

1 Like

because they don’t replicate to other clients when the animation is played locally

SoundService has a property called RespectFilteringEnabled that automatically replicates it for you if it’s turned off. Easy way to do it

They do.
This is exactly what animator does LOL.

1 Like

That sounds like you are trying to sabotage/create vulnerability in someone’s project by enabling property that would let exploiters play any sound they want.

2 Likes

The Animator replicates any Animation played on the client as long as you have network ownership of the character

And to avoid client-caused delay, doing all of it on the server for fairness is a better option anyways (sanity checks and so on)

It replicates the animation, not the animation events

The animation events are part of the Animation though no? So if the server waited for a specific event he would also receive it once the animation reaches that point

Animation transforms your character model, since you own the character, it replicates. Stop arguing

1 Like

dude test it, you’re wrong

the positions replicate, but the animation events dont. they’re only fired on the service they’re played on

?? you literally just proved my point above this reply

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