Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is there a way to send tables w/ metatables through a BindableEvent?

I've been building a sandbox for a project I'm working on, but I'm stuck on events. I can't think of any way of being able to transfer events through a event.

I'm using a modulescript which handles all the sandbox stuff, and I require it on the other end with a regular script.

Is it possible to transfer through my sandboxed tables to the other end or do I have to do some trickery on the other end to get it to work?

2 comments

0

Try HTTP's Encode and Decode.

0

JSONEncode strips the table of it's metatables

1 answer

You could serialize the metatable in theory, but in practice that's terribly inefficient and a very bad solution. Instead, I recommend implementing a module for events (they're about twice as fast as BindableEvents when replicating their functionality). The only downside is that you can't implement RBXScriptSignal:Wait() without an Instance.

1 comment

0

arent functions not able to be serialized though

This discussion is preserved as it was. New answers, comments, and votes are closed.