Function Passed as a Parameter in a Remote Event is nil

I’m working on having visual effects be run on the client rather than the server, and i’ve come across an issue. Before that though, this is how this system is supposed to run.

  1. Module passes a function and some parameters into the VisualService module using either the .AllClients(Function, …) function or .OneClient(Player, Function, …)
  2. VisualService module simply feeds its parameters into a remote event (or unreliable remote event, both have this issue though)
  3. The remote event is caught by the client through a local script and executes the passed function and feeds the remote’s parameters into that function

The Module in step 1 is in Server Storage, the Visual Service is in Replicated Storage, the Remote event is also in Replicated Storage. I’ve tried having the function that I would pass into Visual Service originate from Replicated Storage but to no avail.

Here are some screenshots:

  1. BindableEventService code

  2. Visual Service

  3. Local Script

  4. Image of the error in output
    image

You can’t send functions through a remote event.

Oh my goodness. Thanks lol
Char limit

I would instead use a RemoteFunction or BindableFunction to achieve this, be aware it does yield.

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