GetCollection (Function)

From Goodblox Wiki
Revision as of 02:58, 25 September 2021 by Xyrafrost (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Function
Syntax GetCollection( String class )
Returns Objects
Description: This function returns all instances of a given class which are in the DataModel. Only works for Configuration and VehicleSeat.
In Object: CollectionService


Example

local CollectionService = game:GetService("CollectionService")
 
for i = 1, 10 do
     Instance.new("Configuration", workspace)
end
 
local objects = CollectionService:GetCollection("Configuration")
print(#objects)