[Plugin] PathFinder Lite - Find Your Path

INFORMATION

This is a very simple plugin but a plugin that can save many developers a lot of time! I introduce you to the PathFinder Plugin. Just click on the object you want to find the path o and it will print it in the output! Very useful and time saving for scripters and other users who would like easy access to the objects path. It can find an object in any service in studio!

How To use it?

This plugin is super easy to use! The only things you need to have open and installed are:

  • Output
  • Plugin

If you want to find the objects path first click on the object you want the path too

image

Then Click on the plugin Button!
image

Boom It prints your path in the output!

Which you can copy and paste into your script!

Thanks for reading,
Axyanz

Plugin Link

Discord

6 Likes

This is very simple. I don’t know why you would need this, I would make a plugin with a lot of different small things (like this) in one plugin.

Keep up the good work! :slight_smile:

1 Like

how does this exactly help people?

1 Like

If you do not want to name everything to find one object this is a faster way

Thank you, I will be sure to add more tools and buttons to this plugin for developers!

A plugin similar to this already exists and has the added benefit of having a shortcut that automatically inserts the path as a local variable into an active script.

What I’d like to see, which this other plugin cannot do, is finding the relative path from one object to another. For example, finding the path of a UI element relative to an active script and inserting it as a local variable for us in the script.

1 Like

Could you go more in detail on this I don’t fully understand

Let me create an example using a ScreenGui I’m currently working with.

Functionality and organization/cleanliness of my work aside, this is what my ScreenGui looks like.

Note the two selected items, a script called AnimateTab and a frame called FriendListContainer.
Their two absolute file paths could look like this:

game:GetService("StarterGui")["TabletUI_Friends"].UseableSpace.TopContent.FileBar.Tabs.All.Var.AnimateTab
game:GetService("StarterGui")["TabletUI_Friends"].UseableSpace.Content.LeftPanel.All.FriendListContainer

In the plugin I mentioned earlier, the developer uses a key shortcut to automatically paste in the path into any open script the direct path of whatever object you have selected. What I am suggesting for your plugin is to generate a path relative from an open script (AnimateTab) and automatically find and paste the relative path to whatever you have selected (FriendListContainer)

Your plugin could output something such as:

-- localscript: AnimateTab

local FriendListContainer = script:FindFirstAncestor("UseableSpace").Content.LeftPanel.All.FriendListContainer

In this new example, FriendListContainer is referenced by its relation to the position of AnimateTab. The lowest common denominator between these two objects is the UseableSpace frame. So we start there and work our way back down until we find FriendListContainer.

No matter where I place the screengui TabletUI_Friends (or the frame UseableSpace for that matter) the script will always be able to correctly reference FriendListContainer.

2 Likes

Drilling down to deeply nested instances like this is a code smell. You should only travel a couple instances down at a time. Accessing deeply nested UI elements is traditionally done by having components responsible for each level in the hierarchy, where each component is responsible for controlling its child components and nothing more. Pasting huge paths like this into your script is not a sustainable way to create an interface.

For example, if you ever rename or move something, you suddenly have so many paths to change it’s not even funny.

To each their own, I suppose. I’ve yet to run into any real issues with needing to constantly change paths. I’d say it’s just part of the game. I’d more than happily trade a few seconds of renaming one or two variable paths for a huge bump in readability.

For example, if you ever rename or move something, you suddenly have so many paths to change it’s not even funny.

I’d say moving an element one parent away may as well be changing the entire path, as in, you’ll still have to go in and update it unless you’re using something like FindFirstDescendant. Using this plugin or @SOTR654’s Path to instance plugin to quickly insert the path and then copy the bit I need only takes seconds. I know that I’m only in the programming stage because I’m confident that my gui is locked in. It’s been tested and known to perform the moment and actions I want by manually testing. Though mistakes happen and changing a path is the least of my worries.

Also like I said in my original post I don’t actually use the full path that it generates, but use parts of it and extend off other, more higher-level variable paths that I know will absolutely not change.

For context, this is what the screengui looks like with all those nested folders. It’s a somewhat complicated menu and it absolutely requires that many nested elements.


EDIT:

After re-reading your comment again I think I understand what you meant.

…by having components responsible for each level in the hierarchy, where each component is responsible for controlling its child components…

I think I’ve said it before but I don’t actually use the full path that this plugin generates, only snippets. This is what my variables usually look like (not necessarily in any order)

local TabletUI_Friends = player.PlayerGui:WaitForChild("TabletUI_Friends")
local LP = TabletUI_Friends.UseableSpace.Content.LeftPanel
local RP = TabletUI_Friends.UseableSpace.Content.RightPanel

So yes, it’s preferable to use what I’m going to call Variable Pillars that reference concrete, known-not-to-change paths. Wasn’t trying to contest that as a weaker practice than just outright referencing any element out in full. I just think its nice to press a key shortcut and automatically type the path to snippet so that I don’t develop carpal tunnel :slight_smile:

1 Like

Ctrl + Shift + F

Find & Replace All

1 Like