ReferenceInstances

getinstancesbyclass

Filters getinstances by exact class name.

Syntax

getinstancesbyclass(className: string) -> {Instance}

Parameters

ParameterTypeDescription
classNamestringAn exact class name such as "Part".

Returns

TypeDescription
{Instance}The matching Instances the client holds.

Description

A subclass does not match; use IsA on the result of getinstances for that.

Example

print(#getinstancesbyclass("Part"))

These are Game executor contracts. Check build requirements and session lifetimes before using them.