#How do I use FindFirstDescendant?

1 messages · Page 1 of 1 (latest)

median folio
#

when I try and use it, it says its not enabled. How do I enable this?

iron hemlock
median folio
iron hemlock
#

What system are you making?

cobalt solstice
#

FindFirstChild("thing", true) should work same way

strong forum
#

Stick to FindFirstChild's recursive argument

median folio
rain dome
#

@median folio You can use :QueryDescendants()

API Documentation: https://create.roblox.com/docs/reference/engine/classes/Instance#QueryDescendants

Example code from the Documentation: ```lua

local Workspace = game:GetService("Workspace")

-- Get all MeshPart descendants
print(Workspace:QueryDescendants("MeshPart"))

-- Get all descendants tagged as "Fruit"
print(Workspace:QueryDescendants(".Fruit"))

-- Get all descendants with the name "RedTree"
print(Workspace:QueryDescendants("#RedTree"))

-- Get all descendants with CanCollide property set to false
print(Workspace:QueryDescendants("[CanCollide = false]"))

-- Get all descendants with a "FuelCapacity" attribute assigned
print(Workspace:QueryDescendants("[$FuelCapacity]"))
-- Get all descendants with a "FuelCapacity" attribute set to 75
print(Workspace:QueryDescendants("[$FuelCapacity = 75]"))

iron hemlock
#

Did they introduce it recently?

rain dome
#

Recently came out

#

it's honestly very nice

iron hemlock
#

Agreed

rain dome
#

Can get a bit weird / messy tho, but it's for the better good