ReferenceMetatables

isreadonly

Checks whether a table is read-only.

Syntax

isreadonly(target: table) -> boolean

Also available as

is_read_only

Parameters

ParameterTypeDescription
targettableThe table to check.

Returns

TypeDescription
booleantrue when the table is frozen.

Description

It reports the same state as table.isfrozen and is the opposite of iswritable.

Example

print(isreadonly(table.freeze({})))
print(isreadonly({}))
print(isreadonly(getrawmetatable(game)))

These are Game executor contracts. Check build requirements and session lifetimes before using them.