RemoveEvent:Once()
Published onUsing :Once()
on a RemoteEvent will cause the first queued event to be
received and all other queued events to be discarded.
This is a design flaw: connecting to a signal must not fire the signal, which
remotes do. To avoid losing events, the workaround is to enforce a remote to
have exactly one consumer. By this logic, :Once()
isn’t allowed, because it
adds the one consumer then immediately removes it.
The problem is that connecting to the signal fires it and drains the queue. You literally cannot connect multiple listeners without one of them missing the queued events. The only option is a wrapper with one listener that dispatches to multiple listeners.
There are several solutions to the problem. The most backward compatible would be to trigger the dequeue on the first connection as usual, but defer it so that other connections in the same frame have a chance to connect.