I have a quick question! Is there a way to get to a specific parent in a big group without having to type the whole thing?

So, instead of typing,

script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent

Or

game.Workspace.Part.Part.Part.Part.Part.Part.Part.Part.Part.Potato

there is just a simple and short command instead? Like, you just use the name of the part or something? Please help, thanks!

5 comments

0

why would you have 50 parts nested inside each other?

0

When you are building a large complex and advance object, such as a car, that require multiple objects and parts. This was just an example script though.

0

you can use the second parameter of FindFirstChild to search all descendants

0

so like workspace:FindFirstChild("Potato", true) for your second sample

0

Thank you, that will be very helpful! Would it be possible to do it though the .Parent command, in the case of if I had multiple of the same named parts?