# Using Essentials

{% hint style="info" %}
If you do not know how **Scripts** work, please read the Roblox Documentation about it [here](https://create.roblox.com/docs/reference/engine/classes/LocalScript).

If you do not know how **Local Scripts** work, please read the Roblox Documentation about it [here](https://create.roblox.com/docs/reference/engine/classes/LocalScript).
{% endhint %}

Put in the following code to reference Essentials and be able to use it in the appropriate scripts.

{% tabs %}
{% tab title="LocalScript" %}

```lua
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local Essentials = require(ReplicatedStorage:WaitForChild("Essentials"))
```

{% endtab %}

{% tab title="Script" %}

```lua
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local Essentials = require(ReplicatedStorage.Essentials)
```

{% endtab %}
{% endtabs %}

### Information About The Scripts

As an add-on for new programmers, i'm going to explain on why we use [`WaitForChild()`](https://create.roblox.com/docs/reference/engine/classes/Instance#WaitForChild) in a Local Script and not a Server Script in this case.

We use [`WaitForChild()`](https://create.roblox.com/docs/reference/engine/classes/Instance#WaitForChild) in a Local Script in case the script fails to load properly or has yet to load in. We can use it on a Server Script if we'd like, but majority of the time we do not have to use it because it typically runs first and smoothly on the server, unless you enable [content streaming](https://create.roblox.com/docs/workspace/streaming).

{% hint style="danger" %}
This does not mean that you should not use [`WaitForChild()`](https://create.roblox.com/docs/reference/engine/classes/Instance#WaitForChild) in a Server Script or not use it in a Local Script! There are different scenarios on when you would or wouldn't use it.
{% endhint %}


---

# 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://synilla.gitbook.io/essentials/reference/using-essentials.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.
