Goal: Find a way to make a tagging system that a script can use as a reference point for variables
Issue: It’s not as much as an issue as it is a quality of life script idea.
What solutions have I tried? I have not necessarily tried anything in full, I want to bounce ideas around with the community.
First I must explain what it is I am attempting to accomplish. I have a large game, it is way too complex for one developer to make in any reasonable amount of time. I have many different file locations and many scripts scanning for certain objects in those files. Let’s say I have a frame with some buttons or something, and move it from one spot to another in the directories. I might have 4 or 5 scripts referencing that frame at the old spot when it is no longer there.
I have two ideas to fix this.
Idea 1: use either a Tag or a String value to mark a frame or whatever as what is essentially a UUID. I then scan the entire game for said UUID, and whatever comes back is the location for the variable in the script that has it as a dependency.
Idea 2: Perhaps use UniqueID, but I noticed that some objects don’t have one, and I don’t know how to access it from a script.
This seems like the most straightforward solution. Probably going to mark this as solution, but I’ll wait until the end of today to see if anyone has said anything else.
referance to a part is already unique;
You are trying to reinvent the wheel Unless you are working with this instances in other scripts just use arrays
To tag instance:
Add tag to that or use ModuleScript that stores referance to it for example.
If you are using tags you can use CollectionService:GetTagged() to grab instances with specific tag