Categories > Coding > Lua >

How to find needed folder?

Posts: 20

Threads: 13

Joined: Jun, 2023

Reputation: 0

Posted

I need find fixtures with children who have children(like on ss 1). Another folders looks like ss 2
https://i.imgur.com/t9xqF3R.png

https://i.imgur.com/H3jcY8E.png

  • 0

TERIHAX

i say im gay as a joke 🙀

Posts: 2195

Threads: 102

Joined: Jul, 2020

Reputation: 30

Replied

ok ik barely any lua, but with my logic, you go iterate thru the folders and for each iteration you check if there are children in em

  • 0

Posts: 206

Threads: 9

Joined: Feb, 2023

Reputation: 5

Replied

Can you let us know what type of instances are found inside the IDs in the fixture folders?

  • 0

Added

Can you tell us what type of instances are found inside the IDs in the fixture folders?

  • 0

https://media.discordapp.net/attachments/1134643100715855893/1138795549244539011/SiggyOnGod.png

Posts: 17

Threads: 1

Joined: Sep, 2022

Reputation: 3

Replied

Your best bet might be using `:GetDescendants()` and filtering for the instance you're looking for. If you could provide me with more info on what you're trying to do i can probably help a bit more.

Comments

RaCc0oN 0 Reputation

Commented

I'm resolve it by destroy empty folders)

  • 0

  • 0

WetWipes

Professional Idiot

vip

Posts: 146

Threads: 32

Joined: Sep, 2020

Reputation: 14

Replied

For anyone else that is also looking on how to do this, this is how :)

for i,v in pairs(game.Workspace.fixtures:GetChildren()) do
    print(v)
end

Fixtures would be the name of the folder or object that your trying to find the stuff inside of :)

  • 0

Open to help anyone with anything, DM me on discord :)

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )