Luau has ran into an unexpected error and will not type check until Studio is restarted

Issue Type: Other
Impact: Moderate
Frequency: All the time
Date First Experienced: 2021-02-28 19:02:00 (+00:00)

Reproduction Steps:
I can’t pinpoint the exact steps to reproduce this since it seeminly started happening out of nowhere.
My game uses alot of module scripts, and I recall this happening some time around when I copied a set of module scripts from one game to another. They are arranged in a heirachy structure, with the parent modules requiring child modules.
https://www.roblox.com/games/5944640885/NEA-FPS
It occurs in this place, where I’m writing a game for a school project.

Expected Behavior:
I expect that after restarting studio multiple times, and after reinstalling the issue would fix itself, however that’s not the case.
This means I have ZERO error/warning syntax highlighting and 99% of script suggestions are gone making it hard to code as I’m not warned of any kind of errors while typing and have to rely on running the game and waiting for it to error to fix any syntax problems I don’t stop while typing.

Actual Behavior:
After restarting and the resinstalling the warning still persists. No error/warning syntax highlighting or warning/error in script analysis and code suggestions have disappeared.
(This is restricted to one game however).

To do with the " Scripts Are Non-Strict By Default" beta, when turnt off this problem no longer persists, seems to be with module scripts in the file place under server script service. The strange thing is it affects all scripts not just the scripts inserted, which doesn’t make much sense.

Workaround:
Disable beta “Scripts are Non-Strict By Default”.

8 Likes

The impact is not low this is making scripting uncomfortable

5 Likes

Thanks for the report! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.

3 Likes

Hello, I am also experiencing this issue quite often now, and almost every keyword of the auto complete is gone except for the variables
Luau ran into an unexpected error
I have many more of this but this image is just a sample

Edit: I found 1 rare cause for this issue, if you are connection a signal to a function, and instead you “accidentally” called the function, there is a chance could happen. If it did happen, removing the () and putting it again, makes the thing occur again.
Luau ran into an unexpected error.wmv (266.4 KB)

2 Likes

Running into this issue still. I haven’t done anything out of the ordinary, it happens randomly.

1 Like

How do i disable the “Scripts are Non-Strict By Default”?

Go to file → Beta Features → Find “Scripts are Non-Strict By Default”
Beta Features are ordered in alphabetical order so it’s close to the bottom

1 Like

Thank you for the feedback. We believe that this is now fixed. If you continue to experience the issue please let us know here in this thread.