Wondering if there’s a better way to iterate through Folders / Services to get the item I’m looking for rather than just doing: “:GetDescendants()” with the appropriate / required arguments?
Was thinking that a ‘For i =’ loop could possibly do this, taking note of the previous Parent etc. etc. ?
If you want to get the whole path of the thing you are looking for, you can use Instance:GetFullName() which returns the exact location it is in, so, if a Part was in ServerStorage, Part:GetFullName() would return game.ServerStorage.Part.
What do you mean by “a better way”? What’s wrong with GetDescendants/GetChildren?
If you want specific types of Get functions like a function that gets all the children that are named something then you may have to make your own modules for that, I can show examples if you want. I also find it fun to make my own functions that will be useful in the future.
This is bc of performance usage for :GetDescendants() etc.
So say I’m trying to find a RemoteEvent hidden away in ReplicatedStorage, usually, I would just :GetDescendants() to find it - But this can be cost effective.
I would organize everything (like remote events) in folders, so I would never need to use GetDescendants and instead just use GetChildren game.ReplicatedStorage.RemoteEvents:GetChildren()
Very confused about this question. Why are you using GetDescendants() To find a remote events? Why are you not just using the remote events path? such as
local remote = game.ReplicatedStorage.Remote_Event
-- do stuff with the remote