-- Getting ReplicatedStorage and Workspace service
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local workspace = game:GetService("Workspace")
-- Referencing Essentials
local Essentials = require(ReplicatedStorage.Essentials)
-- Referencing the instance you want to set the attribute to
local damagePart = workspace.DamagePart
-- Setting the attribute and it's value
Essentials.SetAttribute(damagePart, "Damage", 50, true)
Essentials: Successfully set damagePart's attribute name to Damage and the attribute value to 50
Parameters
instance:
The instance you want the attribute to be assigned to.
attributeName:
The name of the attribute.
The value type of the attribute.
Sends an output log to your output window and developer console.