Created
March 19, 2025 06:06
-
-
Save Sleitnick/883dea78f441443a001ddb96742c03eb to your computer and use it in GitHub Desktop.
Revisions
-
Sleitnick created this gist
Mar 19, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ --!strict local function find(parent: Instance, ...: string): Instance local instance = parent for i = 1, select("#", ...) do local name = (select(i, ...)) local inst = instance:FindFirstChild(name) if inst == nil then error(`failed to find instance "{name}" in {instance:GetFullName()}`, 2) end instance = inst end return instance end return find