ClassName (Property): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Mr Doom Bringer No edit summary |
>Legend26 No edit summary |
||
(45 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
{{Property| | {{ReadOnly}} | ||
name = | |||
| | <onlyinclude>{{Property | ||
|description = | |name = ClassName | ||
|object = | |type = {{type|string}} | ||
|}} | |description = A unique string per type of Instance. Should only be used as a unique identifier, as it does not reveal any information about nature of the type hierarchy the type is in. For this use, see [[IsA]]. | ||
|object = Instance | |||
}}</onlyinclude> | |||
{{clear floats}} | |||
{{Example|<pre> | |||
for _, child in ipairs(part:GetChildren()) do | |||
if child.ClassName == 'Part' then | |||
-- will find Parts, but NOT TrussParts, WedgeParts, and other part-like objects | |||
end | |||
end | |||
</pre>}} | |||
[[Category:Properties]] |
Latest revision as of 20:10, 6 April 2012

![]() | |
Type | string |
Description | A unique string per type of Instance. Should only be used as a unique identifier, as it does not reveal any information about nature of the type hierarchy the type is in. For this use, see IsA. |
Member of | Instance |
Example
for _, child in ipairs(part:GetChildren()) do if child.ClassName == 'Part' then -- will find Parts, but NOT TrussParts, WedgeParts, and other part-like objects end end