> ## Documentation Index
> Fetch the complete documentation index at: https://docsuncv2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# isreadonly

Tells you whether a table is currently locked against writes.

```luau theme={null}
isreadonly(t: table): boolean
```

## Parameters

| Parameter | Type    | Description         |
| --------- | ------- | ------------------- |
| `t`       | `table` | The table to check. |

## Returns

`true` if `t` is read-only, `false` otherwise.

## Example

<CodeGroup>
  ```luau Example 1 theme={null}
  <<<<<<< HEAD
  local readonly = isreadonly(getrawmetatable(game))
  =======
  -- isreadonly(t: table): boolean
  >>>>>>> 50e30f53759b0538759af25c9b271514aa2c9290
  ```

  ```luau Example 2 theme={null}
  local t = {hp = 100}
  print(isreadonly(t)) --> false

  setreadonly(t, true)
  print(isreadonly(t)) --> true
  ```
</CodeGroup>

<Tip>
  Most internal metatables are read-only by default and must be unlocked before modifying.
</Tip>
