(post deleted by author)
No, it doesn’t, because he is sending from the server to the client and not vice versa. Even still, use of loadstring is questionable there is often times always a better solution.
It’s completely ridiculous to ship a custom interpreter with your game when you can just put the code you want to invoke in a module script. So much bloat for no reason, while the correct alternative approach is so simple and intuitive.
There is never a situation where you have to invoke variable code on the client from the server during normal game development. It indicates bad system design/architecture of your game if you feel that you need this. Any functionality you need the client to do can be pre-programmed in modules on the client-side and then delegate to that implementation.
What about using Corountines? I think it may be possible that you can make a function that can be passed over with Corountines:
Example
local Function = corountine.create(function() print("test") end)
function Execute(x)
corountine.resume(x)
end
Execute(Function)
Not sure why you would wanna pass Functions through a RemoteEvent in the first place though.
That’s off-topic – this post is about networking, not threading.
not at all. his reply is very relevant to this discussion. this post is about executing functions through a remote event, not about networking specifically. if threading happens to be a viable method to do so, then that would be the solution. the field of development in which the solution lies in does not matter as long as it achieves the desired result. i hope you understand what im trying to say here. thanks