Michael-48/Iris

:Disconnect method for Iris:Connect and State:OnChange objects

Closed this issue · 3 comments

:Disconnect method for Iris:Connect and State:OnChange objects

Should be fixed here: 95e9232

I don't think there's a better way to do this without creating a new table data structure. I was initially concerned that setting a table element to nil would decrease the table length, but it looks like this method works fine.

This is probably the better way to do this. A table with nothing except a Disconnect method just for the sake of consistency with RBXScriptConnection instances is overkill now that i think of it.

Yeah, it would be nice, but there are other examples of where returning the disconnect callback is perfectly fine.