Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Most efficient way to get a script's path to workspace?

So, I created a certain module I plan to release to the public for a model of mine. They would put this module in a flag. I want the module to get its path from workspace. For example, if the module was in a model, inside a model, I would want it to return script.Parent.Parent.Parent or something like that. How would I do this?

1 answer

✓ Accepted answer

If you want a string of the object's path in the hierarchy, you use the GetFullName() method.

print(script:GetFullName())

1 comment

1

Thank you very much!

This discussion is preserved as it was. New answers, comments, and votes are closed.