---
description: Guide on how to reference Essentials.
---

# 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 %}
