Hey, so I know how to use CollectionService, that’s all fine, but I have a bit of a problem.
Suppose I wanted to tag instances in my game with the tag “Door” when my game first ran. Rather than just naming them something identifiable as such, is there no way to reliably tag instances in studio itself without using ValueObjects?
Currently, I just throw a ValueObject inside of the instance, name it Door, iterate through everything in the workspace and if it’s a ValueObject with the name Door, I use CollectionService to tag it as Door.
Is there a better way to handle this? How should I go about solving this? Or is the way I’m currently doing it correct? If there’s a more elegant solution to this problem, I’d love to know.
I suspect you want to tag them all in order to use GetTagged(), but why bother with that, when you can just put all the doors inside a folder named Doors?
This honestly looks great - so basically this thing just assigns tags to every part you assign using it? That’s cool, but does it create a script or something that just runs when the game starts?
That’s very cool. I wasn’t aware that CollectionService tags actually saved; I just assumed they were all saved in a dictionary that was created when the game ran, and gc’ed when the game closed. Thanks!