Hello! I want to know what is LuaU, and how can I use it?
(with your own words please, do not link me to another website that has this answer, I want the answer from someone that knows and can describe it to me)
Hello! I want to know what is LuaU, and how can I use it?
(with your own words please, do not link me to another website that has this answer, I want the answer from someone that knows and can describe it to me)
It’s just a rewrite of Lua 5.1 that suits the needs of what Roblox has grown too. Roblox decided against upgrading to a released version of Lua to avoid as many issues as possible with backwards compatibility and instead is making a programming library from scratch.
Having grown a substantial internal codebase that needed to be correct and performant, and with the focus shifting a bit from novice game developers to professional studios building games on Roblox and our own teams of engineers building applications, there was a need to improve performance and quality of the code we were writing.
Roblox’s statement on why they are using LuaU
I’m still going to link external resources since there is no reason to recap this whole article Roblox has kindly put on their GitHub which gives the general reason behind the whole thing.
In a nutshell, luau is roblox’s optimized edit of lua. It’s become the default vm for all games last year so you don’t have to do anything to enable it or anything like that.
However there’s also the new type checker which is also referred to as luau. It can be enabled under beta features in studio, and it let’s you add type declarations to your code and have it easily warn you about any possible type mismatches (ex. passing a string to a function which is declared to take numbers).