Hi, at the time of making this topic I just discovered a bug in the script editor of Studio.
If I have a large script open (up to a thousand lines long), whenever I type the double-dot character ( : ) Studio will just freeze and crash. This happens 90% of the time. I noticed that bug just after making this topic, not before.
Here’s a video to show the problem:
Computer specs:
CPU: Intel Core i3-7020U 2.30 GHz
GPU: Intel HD Graphics 620
RAM: 8 GB
OS: Windows 11 Home x64, upgraded from Windows 10 with ISO
Expected behavior
Studio not crashing of course.
A private message is associated with this bug report
Thank you for the report. Are you able to share the script in question privately for us to use to reproduce? Sorry, the logs you shared aren’t enough in this case.
Sorry for the late reply.
I put the script I used in the private message. If you try to type “if Button:IsA(“GuiButton”) then” at line 43, Roblox Studio will just crash when you start typing “:”.
Maybe also try this at any line, to see if the bug can be repro’d anywhere in the script.
Hello! I was able to reproduce the crash given the script and reproduction steps, thank you! This looks like we’re producing a really large nested type. There’s a couple potential fixes here but we’ll keep you in the loop as one rolls out 
In the mean time, you may be able to mitigate this by giving the parameter to ConnectTargetedButton a type hint, such as:
-- Not sure what kind of buttons you expect but this might help
local function ConnectTargetedButton(Button: ImageButton | GuiButton | TextButton)
-- ...
end
We aim for users to be able to write Luau without any type hints, and Luau should never cause Studio to crash.
Thanks for fixing the bug!
I tried a different workaround a few weeks ago, what I did is write the if statement out of the function and then copy and pasting it inside the function.
1 Like
Hello! Took a look at this recently and it looks like we’re able to handle autocomplete here, at least on my machine. Let me know if it’s still crashing for you but I’ll be closing this issue out 