首页 文章
  • 3 votes
     answers
     views

    Lua setfenv / metatable sandbox不适用于ROBLOX方法

    在ROBLOX Lua中,我正在编写一个涉及用户创建和运行Lua脚本的游戏 . 显然,我需要阻止使用某些服务和函数,例如Player类上的Kick函数,或者与DataStore或TeleportService相关的任何东西 . 到目前为止,我已经成功地通过使用setfenv将函数的环境设置为metatable来创建沙盒环境,metatable附加到“沙箱”表 . 在__index上,如果在沙箱表中...

热门问题