Passing a function to a client through RemoteEvent/RemoteFunction

Hello DevForum,

I’ve recently started experimenting with a custom admin framework. This admin framework needs an initialisation function to be ran on the client, though only admins need their local admin module enabled for this to work. As such, the initialisation function doesn’t need to be on every client. I’m trying to achieve a system in which the server verifies a player is an admin and passes them the initialisation function to be ran locally.

I’ve tried running this through a RemoteEvent, but to no avail. The function I provided as an argument evaluates to nil on the client, which could be a built-in security measure which I would understand.

Is there any other way I could achieve this?

1 Like

Basically, no. Functions can’t be passed through RemoteEvents or RemoteFunctions. There have been a few threads on this before, the most help you’re going to get is in discussion here:

2 Likes

Thought so. My apologies for the repeat question, didn’t think of searching for it first.

Thanks for the extremely quick answer though, thread solved.