Roblox uses Normal Identities, basicly they assign a lua block/object to a certain number. They use 2 for Scripts and LocalScripts, which can only use non-secured functions, while the command bar can access everything that is LocalUserSecurity and RobloxPlaceSecurity. How can I implement this type of Lua Security into NLua?


The best way to create a safe environment to Lua, is creating a sandbox using lua. You just need to "hide" the unsafe functions the let only the "safe" functions visible.

For exemple:

os.exit = function () {} -- after this os.exit() will be harmless.

There is more info here http://lua-users.org/wiki/SandBoxes


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.