A question Regarding the use of :QueryDecendants

I am attempting to optimize a workspace search tool and I am experimenting with the use of QueryDecendants using a string selector to achieve this.
However, I cannot find any documentation on how to properly search for an Instance name if that instance name contains a space.
I have tried "Folder[Name = \"Name with space\"]" but it unsuccessfully returns the folder with the name “Name with space”.

Can someone help me out with the formatting here?

1 Like

it’s actually documented here with examples https://create.roblox.com/docs/reference/engine/classes/Instance#QueryDescendants

if you are familiar with javascript it’s similar to their query selector system. I’m not actually sure if this works with spaces you’ll have to test it

workspace:QueryDescendants('Folder[Name="Name with space"]')

Are you certain that you are putting the name correctly?
When I tested it out myself, it works fine:
image

(this was using the exact search that you provided)

1 Like

Odd, must have been working too late and made a simple mistake somewhere else.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.