BindableEvent does not accept mixed tables


local Event = "BindableEvent" )

Event:Fire( {[2] = true} )

As far as I can think of there should be no need for it to need non-mixed tables, it shouldn’t be converting it to json / whatever seeing as it’s not being sent to a client / server, it’s just being used locally so it should be able to be passed as is

Not sure if this should be here or feature requests, but oh well

This has been known for like…ever?

I just found out about it, either way, if there is a good reason for it I’m sure someone can let me know and I’ll find some solution to my problem

I heard this happens because the way they convert tables to JSON is broken for mixed tables.

No, JSON cannot have mixed tables, that is just invalid JSON.

But yes @Partixel , the reason you cannot have mixed tables is because it is transmitted as JSON which does not support mixed tables (Which are a terrible thing anyway, why are you even using them?!)
I would assume the reason for having both transmitted as JSON is for code re-use so that both types of Event objects transmit with the same message format which makes life a lot easier on their side.

1 Like

1 Like I just use this, so far the code they made has worked for my needs, and it can pass any data and acts like a normal connection (though the methods are capitalized for some reason).

But why are bindable events using JSON? It’s not sending the table anywhere?

As I said it is probably for code re-use, you can’t just pass a memory address from client to server, so they convert it to JSON and send that. In order to standardise the method of communicating with Event objects, they made both RemoteEvent and BindableEvent use the same method of communication.

1 Like

I see, thanks :slight_smile: