> For the complete documentation index, see [llms.txt](https://refresh-cx.gitbook.io/refresh.cx-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://refresh-cx.gitbook.io/refresh.cx-docs/runtime/create-thread.md).

# Create Thread

Runs the function on a game thread. Returns the thread results.

## **Syntax**

```lua
refresh.Runtime.CreateThread(fn)
```

## Usage Example

```lua
refresh.Runtime.CreateThread(function()
    while true do
        print("tick")
        Wait(1000)
    end
end)
```
