Currently to fix this issue I just re-organize the table, but it would be better if Roblox’s could just skip the nil values in the tables because it happens often when you are inserting things into a table and some of those values end up being nil.
Thank you.
Unrelated But This Is Something I Dislike:
As much as I believe nil to refer to a non-existing value, it has effects on specific functions when you send it, is a behavior I never liked but it is what it is…
Not happening. Too much potential for weird semantics with tables containing a lot of gaps.
If you’re worried about perf of constructing a variably sized Lua table you can always use if x then raycastParams:AddToFilter(x) if you weren’t aware of that method.
Thank you for the response! I will keep doing it then the way I am doing it, the reason for it was because a lot of time directly, I assign FilterDescendantsInstances a table right away containing values that can be nil, like calling a function that could return nil inside the table, leaving a hole. This means I need to do if statements and properly add them using AddToFilter instead.
I made this request, because I thought some filtering was being done every time the FilterDescendantsInstances property was changed by the developer. As we can see in this image:
There is some magic being done to flatten the table.
However that magic is much easier to do. Things are easy for the reflection system as long as it’s clear whether things are arrays or maps. Once you have a table with gaps in it, how things should be interpreted gets much more murky.