Yuari
Documentation

IsA

Class checks understand common hierarchies (BasePart, Model, GuiObject, ValueBase, LuaSourceContainer, Tool, …).

Syntax

:IsA(className: string) -> boolean

Parameters

ParameterTypeDescription
classNamestringThe Roblox class name to match.

Returns

TypeDescription
booleanBoolean

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.