I have accidentally come across a bug that was giving me this error:
And in further inspection, I discovered that a mini OOP class w/private variables will crash studio:
I’m actually super confused because I could only reproduce this with an underscore variable & nothing else.
Code:
--!strict
local main = {}
main.tbl = {}
main.__index = main
setmetatable(main,main)
function main.add(name: string,func: (any) -> nil)
main.tbl[name] = func
end
Steps to reproduce:
- edit the
main.tbl[name]
line & add_
infront of thetbl
- add
_
infront ofmain.tbl
above - voila, click & crash