PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

GetCollection

Returns all instances of a given class which are in the /DataModel. Only works for /Configuration, /CustomEvent, /CustomEventReceiver, /Dialog, and /VehicleSeat.

Parameters

Name Type Default Description

Returns

Return Type Summary

Code Samples


CollectionService:GetCollection1

local CollectionService = game:GetService("CollectionService")

for i = 1, 10 do
  Instance.new("Configuration", workspace)
end

local objects = CollectionSrvice:GetCollection("Configuration")
print(#objects)