Whoops, it’s called CollectionService, not CollectiveService.
The use of the service is pretty straightforward, the service utilizes what is called Tags. These tags act as containers or the way I see it, a table filled with objects.
To assign an object to a tag, you’ll need to get the service first. Easy enough right?
local CollectionService = game:GetService("CollectionService")
Then, we’ll need to define a tag for all the doors. For simplicity, we will just use “Doors”
CollectionService:AddTag(doorObject, "Doors") --Object, Tag
The beauty of this service is if you serialize all of your objects in the studio you will only have to do this once. It will persist on newly created place servers. So let us say we create a folder of all the doors, that way we can efficiently iterate through them all.
local CollectionService = game:GetService("CollectionService")
local doorFolder = workspace.Doors
for _, currentDoor in pairs(doorFolder:GetChildren()) do
CollectionService:AddTag(currentDoor, "Doors") -- will then take the current door and put it under the Doors Tag.
end
Alternatively you can just paste this in the command bar. and it will serialize them.
for _, currentDoor in pairs(workspace.Doors:GetChildren()) do
game:GetService("CollectionService"):AddTag(currentDoor, "Doors")
end
My time on the internet is very limited so I’ll just send you the place file I have.
Doors.rbxl (29.8 KB)
It still doesn’t address your UI cloning issue. 