Changed (Event)/property: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Mr Doom Bringer
New page: <onlyinclude>{{Event|name=Changed |arguments=String ''Property'' |description= Fired after the specified property is changed |object= Global |}}</onlyinclude>
 
m Text replacement - "</SyntaxHighlight>" to "</syntaxhighlight>"
 
(26 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<onlyinclude>{{Event|name=Changed
<onlyinclude>{{Event
|arguments=[[String]] ''Property''
|name = Changed
|description= Fired after the specified property is changed
|arguments = [[Property]] <var>property</var>
|object= Global
|description = Fired whenever a property of the object changes.
|}}</onlyinclude>
|object = Instance
}}</onlyinclude>
 
{{clear floats}}
 
{{Example|
This code would print the value of each property of the Workspace, as well as its name, whenever it is changed:
<syntaxhighlight lang="lua">
Workspace.Changed:connect(function(property)
print(property .. ": ", Workspace[property])
end)
</syntaxhighlight>}}

Latest revision as of 06:15, 27 April 2023

Changed ( Property property )
Description Fired whenever a property of the object changes.
Member of: Instance


Example

This code would print the value of each property of the Workspace, as well as its name, whenever it is changed:

Workspace.Changed:connect(function(property)
	print(property .. ": ", Workspace[property])
end)