Find an Instance by walking up ancestors.
local humanoid = FindUp(script, "Humanoid", {
className = "Humanoid",
})
local roact = FindUp(script, "Roact", {
className = "ModuleScript",
})Add find-up to your wally.toml and run wally install
# wally.toml
[dependencies]
FindUp = "csqrl/[email protected]"$ wally installInstall the @rbxts/find-up package using npm or yarn.
$ npm i @rbxts/find-up
$ yarn add @rbxts/find-up
$ pnpm i @rbxts/find-upDocumentation can be found at https://csqrl.github.io/find-up.