The Luau export keyword when combined with local, const, and function no longer works in ModuleScripts.
Instead it’s treated as invalid Grammar for Luau and a Syntax error is being thrown.
This is actively affecting my game. Multiple critical scripts require various modules which utilize the new syntax and are now completely non-functional.
Thanks for the report! While we did enable export temporarily it was not officially announced and due to a potential issue we identified we decided to roll it back for now. Please keep an eye out for the official announcement post and, until then, you should use return instead of export.
Even if there wasn’t an entire announcement made on the DevForum regarding the feature, it was still included in official release notes and was marked as “Live”. This should indicate that the feature is Live and is ready for usage in active projects. This feature was not released under a Studio Beta, nor were there any announcements to indicate it should not be used in live work.
In the future, when other features are included under the official release note’s “Improvements” category—and are marked as live—how are developers supposed to know when some features are subject to the possibility of being rolled back at a later date? It’s unreasonable to expect developers to not use each and every feature marked as live in release notes until they have their own dedicated announcement addressing them.
If this was already marked as Live in the official release notes, developers had every reason to treat it as production ready. Roblox ships many Luau and Studio changes through release notes without separate DevForum announcements, so requiring a dedicated announcement after the fact is unreasonable. If I remember correctly, export has been available for at least a month, and I’ve been using it ever since it came out.
When will this be available again? Since it was already live and is now breaking existing code, I strongly believe it should be re-enabled as soon as possible.
Unfortunately, due to the way our release notes work this feature was preemptively marked as live before it was actually ready for use. We’re exploring ways to make sure this doesn’t happen in the future.
At the moment we don’t have an ETA for when this will be available again. We’re making sure the design of export is compatible with other language features we have planned, and if it’s not, we’re going to need to make some changes to it.