In almost all situations, tagged objects have their own identity, state and behavior. The pattern goes like this: when a tag is found (
CollectionService:GetInstanceAddedSignal), create a Lua object with the Roblox instance.
Source: CollectionService documentation
No API members of the CollectionService suggest that tags are anything but associative strings on instances. That being said, if I’m understanding this correctly, the CollectionService supposedly creates objects to represent tags.
Does the CollectionService create Lua objects for tags or are they just arrays held somewhere? How are tags handled? I assume that the created object is absolutely nothing on memory and performance with dynamic management a plus (we just need to clean returned references from service methods), but this wording just confuses me.
Just to be clear: I’m asking for the sake of knowledge and out of curiosity. The response shouldn’t change one’s view on CollectionService or how they use it. As far as we’re concerned, tags are strings associated with instances and the methods return objects we can use to our advantage when working with groups of objects without hierarchical dependence.