Yuari
Documentation
Docs/Instances/GetAttribute

GetAttribute

Reads/writes instance attributes.

Syntax

:GetAttribute(name: string) -> any

Parameters

ParameterTypeDescription
namestringThe name used for the lookup or new object.

Returns

TypeDescription
anyValue / table

Description

GetAttribute is part of the Instances library. Instances are live proxies backed by game memory. Property reads and method calls go through Roblox's own objects.

The call is read-only: it resolves the current value when invoked and does not change the underlying state.

The aliases :SetAttribute(name, value), :GetAttributes() resolve to the same implementation.

Example

workspace:SetAttribute("Mode", "test")
print(workspace:GetAttribute("Mode"))
for name, value in pairs(workspace:GetAttributes()) do
    print(name, value)
end

Notes

  • Aliases: :SetAttribute(name, value), :GetAttributes().
  • Instance proxies are backed by live game memory.