πUsing Essentials
Guide on how to reference Essentials.
Put in the following code to reference Essentials and be able to use it in the appropriate scripts.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Essentials = require(ReplicatedStorage:WaitForChild("Essentials"))
Information About The Scripts
As an add-on for new programmers, i'm going to explain on why we use WaitForChild()
in a Local Script and not a Server Script in this case.
We use 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.
This does not mean that you should not use 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.
Last updated