setreadonly
function setreadonly(table: { any }, state: boolean): ()Parameters
Example
local Metatable = getrawmetatable(game)
Metatable.Example = "Hello" -- Throws an error
setreadonly(Metatable, false)
Metatable.Example = "Hello"
print(Metatable.Example) -- Output: Hello
setreadonly(Metatable, true)Last updated