> For the complete documentation index, see [llms.txt](https://stellardocs.bulkgames.us/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stellardocs.bulkgames.us/maid/givetask.md).

# GiveTask

Assigns a task to the specified Maid instance.

```lua
Maid:GiveTask(task)
```

### task

The task parameter is handled upon the use of [`Maid:DoCleaning()`](/maid/docleaning.md) and can be of the following types:

* **Function:** the maid will execute the function&#x20;
* **Connection**: the maid will disconnect the connection
* **Instance**: the maid will run `:Destroy()` on any object derived from the [Instance](https://create.roblox.com/docs/reference/engine/classes/Instance#properties) class
* **Object**: the maid will clean up any object which has a `:Destroy()` method, such as instances of custom classes *(for example other* [*Maid*](/maid/introduction.md) *instances)*
