Skip to main content

Attribute

Sets an object's attribute to any value

TypeSinceScoped
Declaration0.0.3No

Constructor

[Attribute(AttributeName : string)] = any

Usage

When using New(), you can input property names and associate them with any values. However, if you want to set an attribute instead, you can use Attribute(), like so:

New(MyObject, {
[Attribute "Lemons"] = 5, -- Sets attribute "Lemons" to 5
})

print(MyObject:GetAttribute("Lemons")) -- Prints "5"