makereadonly Synchronous
Mark a table read-only after you finish populating it. This is a quick way to stop accidental later writes to a shared configuration table.
Luau
makereadonly(value: Table) -> ()Parameters
| Parameter | Type | Description |
|---|---|---|
value | Table | Table to protect from writes. |
Returns
()No value.
Example
Luau
local settings = { theme = "dark" }
makereadonly(settings)
print(isreadonly(settings)) -- true