This was discovered when my remotes randomly stopped working when using the module packet by suphi
RemoteEvent.OnClientEvent connections made inside ModuleScripts sometimes fail to receive any events during Roblox Studio Playtest.
The RemoteEvent is fired correctly from the server using FireClient/FireAllClients, but the client ModuleScript never receives the signal. No errors are thrown, and the OnClientEvent callback simply does not execute.
The issue appears to be specific to certain initialization cases involving ModuleScripts. The same RemoteEvent works correctly when the OnClientEvent connection is moved directly into a LocalScript, but fails when handled through a ModuleScript-based networking system.
Expected behavior:
RemoteEvent.OnClientEvent should fire normally regardless of whether the listener is connected from a LocalScript or a required ModuleScript.
Actual behavior:
The ModuleScript successfully loads and creates the OnClientEvent connection, but the callback is never invoked when the server fires the RemoteEvent.
Steps to reproduce:
- Create a RemoteEvent in ReplicatedStorage.
- Require a ModuleScript from a LocalScript.
- Connect RemoteEvent.OnClientEvent inside the ModuleScript.
- Fire the RemoteEvent from the server.
- Observe that the client callback does not run.
This appears to happen rarely and is difficult to reproduce consistently, but when it occurs the client will not receive any signals through that ModuleScript connection. I do not know what or how this happens and there is no errors, the only way i reproduce it is by spamming playtest until the bug happens again
Expected behavior
onclientevent should fire correctly