Try it in your browserpreview Source

Find First Ancestor Of ClassRoblox✎

Instances node.

Pending review

Find First Ancestor Of ClassInstanceModelClass Name
  • needs the Roblox engine — its datatypes, its DataModel or its scheduler
  • pure — no execution pins, wire it anywhere
  • names its result — Result name in the Inspector is the local it binds, and a Declare Local reading that result makes a second one: see Variables and locals

Inputs

  • Instance:Instancemust be wired
  • Class Name:string= "Model"from a list
    Offers 625 values to pick from, and takes anything else typed in.

Outputs

  • result:Model?

What it compiles to

luau
print((instance:FindFirstAncestorOfClass("Model") :: Model?))

Not reviewed yet