Autocomplete in the Script Editor Crashes Studio

When attempting to type value.Parent = nil at line 6, Roblox Studio crashes. This happens with the following code:

local table1: {Part} = {}
local table2 = {}

for index, value in table2[1] do
	table.insert(table1, value)

end

With a lot of trial and error, this is what I’ve managed to figure out so far:

  • Disabling the Enable Autocomplete setting in Studio settings fixes the issue
  • Removing the type annotation from table1 fixes the issue
  • Changing table2[1] to table2 fixes the issue
  • Removing table.insert(table1, value) fixes the issue

I’m running the latest version of Studio on macOS with an m-series chip.