Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add magic function for :FindFirstAncestor() #728

Open
znotfireman opened this issue Aug 3, 2024 · 0 comments
Open

Add magic function for :FindFirstAncestor() #728

znotfireman opened this issue Aug 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@znotfireman
Copy link

znotfireman commented Aug 3, 2024

Given that theres magic functions for :WaitForChild() and :FindFirstChild(), there should be a magic function for :FindFirstAncestor(), e.g:

-- Plugin
-- |_ MyPlugin
--    |_ Runtime
--       |_ Components
--          |_ Button
--          |_ Text

-- Plugin/MyPlugin/Runtime/Components/Button.luau
local Runtime = script:FindFirstAncestor("Runtime")
local Text = require(Root.Components.Text)

local function Button(scope, props)
 return -- ...
end

return Text
@JohnnyMorganz JohnnyMorganz added the enhancement New feature or request label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants