ItemAdded (Event)

From Goodblox Wiki
Revision as of 03:03, 25 September 2021 by Xyrafrost (talk | contribs) (→‎Example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Event
Syntax ItemAdded( Instance instance )
Description: This function fires when a Configuration or VehicleSeat is added to the DataModel.
In Object: CollectionService


Example

game:GetService("CollectionService").ItemAdded:connect(function(instance)
     print(instance.className.." added to DataModel")
end)
 
Instance.new("Part", workspace) --// Doesn't fire because CollectionService doesn't watch Parts
Instance.new("Configuration", workspace) --> Configuration added to DataModel