How to get a instance path (by script)

I found another similar topic but I didn’t find the answer (or I didn’t understand well)

So here is my question, I want to get the path of a instance and put this information in a TextLabel…

Example:
image

The TextLabel.Text should be = game.Workspace.NiceFolder.Part
So, the information in the TextLabel should be the path/directory of any Instance (in this case, of that part)

You would use Instance:GetFullName() which I think should Return the Path.

2 Likes

Just saying that GetFullName() isnt 100% accurate since it lists the instances descendants name not the service itself so if you try to use this in a script of some sort then it might not work based on how you use it.

1 Like

Ancestors*

Yes that is true, but provided all services remain named exactly as they normally are (bar SoundService which is automatically renamed to SoundScape on run), it should run just fine.

1 Like

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