# Callbacks

**Noir.Callbacks**: `table`

A module of Noir that allows you to attach multiple functions to game callbacks.

These functions can be disconnected from the game callbacks at any time.

***

**Noir.Callbacks.Events**: `table<string, NoirEvent>`

A table of events assigned to game callbacks.

Do not directly modify this table.

***

```lua
Noir.Callbacks:Connect(name, callback, hideStartWarning)
```

Connect to a game callback.

### Parameters

* `name`: string
* `callback`: function
* `hideStartWarning`: boolean|nil

***

```lua
Noir.Callbacks:Once(name, callback, hideStartWarning)
```

Connect to a game callback, but disconnect after the game callback has been called.

### Parameters

* `name`: string
* `callback`: function
* `hideStartWarning`: boolean|nil

***

```lua
Noir.Callbacks:Get(name)
```

Get a game callback event. These events may not exist if `Noir.Callbacks:Connect()` or `Noir.Callbacks:Once()` was not called for them.

It's best to use `Noir.Callbacks:Connect()` or `Noir.Callbacks:Once()` instead of getting a callback event directly and connecting to it.

### Parameters

* `name`: string

### Returns

* `NoirEvent`

***

```lua
Noir.Callbacks:_InstantiateCallback(name, hideStartWarning)
```

Creates an event and an \_ENV function for a game callback.

Used internally, do not use this in your addon.

### Parameters

* `name`: string
* `hideStartWarning`: boolean

### Returns

* `NoirEvent`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cuhhub.gitbook.io/noir/api-reference/callbacks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
