GetAttribute

This function allows you to get attributes of an instance.

Example Usage:

-- 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

-- Getting the attribute's value
Essentials.GetAttribute(damagePart, true)

Parameters

instance: Instance

The instance you want the attribute to be assigned to.

attributeName: string

The name of the attribute.

debugging: bool

Sends an output log to your output window and developer console.

References

Last updated