IsA
Class checks understand common hierarchies (BasePart, Model, GuiObject, ValueBase, LuaSourceContainer, Tool, …).
Syntax
:IsA(className: string) -> boolean
Parameters
| Parameter | Type | Description |
|---|---|---|
className | string | The Roblox class name to match. |
Returns
| Type | Description |
|---|---|
boolean | Boolean |
Description
IsA 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 a predicate: it inspects the current state and returns a boolean without modifying anything.
The aliases :IsDescendantOf(ancestor) resolve to the same implementation.
Example
local part = workspace:FindFirstChildWhichIsA("BasePart")
if part then
print(part:IsA("BasePart"), part:IsDescendantOf(workspace))
end
Notes
- Aliases:
:IsDescendantOf(ancestor). - Instance proxies are backed by live game memory.