Show raw api
{
"functions": [
{
"name": "new",
"desc": "Constructs a new AttributeValue. If a defaultValue that is not nil\nis defined, then this value will be set on the Roblox object.",
"params": [
{
"name": "object",
"desc": "",
"lua_type": "Instance"
},
{
"name": "attributeName",
"desc": "",
"lua_type": "string"
},
{
"name": "defaultValue",
"desc": "",
"lua_type": "T?"
}
],
"returns": [
{
"desc": "",
"lua_type": "AttributeValue<T>"
}
],
"function_type": "static",
"source": {
"line": 37,
"path": "src/attributeutils/src/Shared/AttributeValue.lua"
}
},
{
"name": "ObserveBrio",
"desc": "Handles observing the value conditionalli",
"params": [
{
"name": "condition",
"desc": "",
"lua_type": "function | nil"
}
],
"returns": [
{
"desc": "",
"lua_type": "Observable<Brio<any>>"
}
],
"function_type": "method",
"source": {
"line": 60,
"path": "src/attributeutils/src/Shared/AttributeValue.lua"
}
},
{
"name": "Observe",
"desc": "Observes an attribute on an instance.",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Observable<any>"
}
],
"function_type": "method",
"source": {
"line": 68,
"path": "src/attributeutils/src/Shared/AttributeValue.lua"
}
}
],
"properties": [
{
"name": "Value",
"desc": "The current property of the Attribute. Can be assigned to to write\nthe attribute.",
"lua_type": "T",
"source": {
"line": 78,
"path": "src/attributeutils/src/Shared/AttributeValue.lua"
}
},
{
"name": "Changed",
"desc": "Signal that fires when the attribute changes",
"lua_type": "Signal<()>",
"readonly": true,
"source": {
"line": 85,
"path": "src/attributeutils/src/Shared/AttributeValue.lua"
}
}
],
"types": [],
"name": "AttributeValue",
"desc": "Allows access to an attribute like a ValueObject.\n\n```lua\nlocal attributeValue = AttributeValue.new(workspace, \"Version\", \"1.0.0\")\nprint(attributeValue.Value) --> 1.0.0\nprint(workspace:GetAttribute(\"version\")) --> 1.0.0\n\nattributeValue.Changed:Connect(function()\n\tprint(attributeValue.Value)\nend)\n\nworkspace:SetAttribute(\"1.1.0\") --> 1.1.0\nattributeValue.Value = \"1.2.0\" --> 1.2.0\n```",
"source": {
"line": 19,
"path": "src/attributeutils/src/Shared/AttributeValue.lua"
}
}