Skip to content

Added functionality to layer on top of Roblox's CollectionService

License

Notifications You must be signed in to change notification settings

Bytebit-Org/roblox-ExtendedCollectionService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Extended Roblox CollectionService

Added functionality to layer on top of Roblox's CollectionService

Documentation

function Class:AddTagToAll(instances, tag)

Adds a tag to all elements in the array of instances

Parameters:

  • instances (array<Instance>)
    The instances to tag
  • tag (string)
    The tag to add
function Class:AddTagsToAll(instances, tags)

Adds a list of tags to all elements in the array of instances

Parameters:

  • instances (array<Instance>)
    The instances to tag
  • tags (array<string>)
    The tags to add
function Class:RemoveTagFromAll(instances, tag)

Removes a tag from all elements in the array of instances

Parameters:

  • instances (array<Instance>)
    The instances to untag
  • tag (string)
    The tag to remove
function Class:RemoveTagsFromAll(instances, tags)

Removes a list of tags to all elements in the array of instances

Parameters:

  • instances (array<Instance>)
    The instances to untag
  • tags (array<string>)
    The tags to remove
function Class:HasTags(instance, tags)

Checks whether a given instance has all the tags provided

Parameters:

  • instance (Instance)
    The instance to check
  • tags (array<string>)
    The tags to look for

Returns:
boolean
True if the instance has all the tags

function Class:GetMutliTagged(tags)

Gets all instances that match the given set of tags

Parameters:

  • tags (array<string>)
    The tags to match

Returns:
array<Instance>
The instances that match the set of tags

function Class:GetTaggedChildren(parent, tag)

Gets all children of an instance with a tag

Parameters:

  • parent (Instance)
    The parent to search the children of
  • tag (string)
    The tag to search for

Returns:
array<Instance>
The children that have the tag

function Class:GetTaggedDescendants(ancestor, tag)

Gets all descendants of an instance with a tag

Parameters:

  • ancestor (Instance)
    The ancestor to search the descendants of
  • tag (string)
    The tag to search for

Returns:
array<Instance>
The descendants that have the tag

function Class:GetMultiTaggedChildren(parent, tags)

Gets all children of an instance with all of the given tags

Parameters:

  • parent (Instance)
    The parent to search the children of
  • tags (array<string>)
    The tags to search for

Returns:
array<Instance>
The children that have all the tags

function Class:GetMultiTaggedDescendants(ancestor, tags)

Gets all descendants of an instance with all of the given tags

Parameters:

  • ancestor (Instance)
    The ancestor to search the descendants of
  • tags (array<string>)
    The tags to search for

Returns:
array<Instance>
The descendants that have all the tags

function Class:GetRelativesWithTags(baseInstance, tags, numLevels)

Gets all relatives, not including the top-most ancestor, that match the given set of tags

Parameters:

  • baseInstance (Instance)
    The instance to get the relatives of
  • tags (array<string>)
    The tags to check for
  • numLevels (number)
    The number of levels to go up

Returns:
array<Instance>
The relatives that match, not including the baseInstance or the top-most ancestor

function Class:GetChildAddedSignal(parent, tag)

Gets a signal for when a child is added with the given tag to the given parent

Parameters:

  • parent (Instance)
    The parent to listen for children of
  • tag (string)
    The tag to listen for

Returns:
RBXScriptSignal
The signal, will provide the new child as an argument to any handlers connected to it

function Class:GetDescendantAddedSignal(ancestor, tag)

Gets a signal for when a descendant is added with the given tag to the given ancestor

Parameters:

  • ancestor (Instance)
    The ancestor to listen for descendants of
  • tag (string)
    The tag to listen for

Returns:
RBXScriptSignal
The signal, will provide the new descendant as an argument to any handlers connected to it

function Class:GetChildRemovedSignal(parent, tag)

Gets a signal for when a child is removed with the given tag from the given parent

Parameters:

  • parent (Instance)
    The parent to listen for children of
  • tag (string)
    The tag to listen for

Returns:
RBXScriptSignal
The signal, will provide the former child as an argument to any handlers connected to it

function Class:GetDescendantRemovedSignal(ancestor, tag)

Gets a signal for when a descendant is removed with the given tag from the given ancestor

Parameters:

  • ancestor (Instance)
    The ancestor to listen for descendants of
  • tag (string)
    The tag to listen for

Returns:
RBXScriptSignal
The signal, will provide the former descendant as an argument to any handlers connected to it

About

Added functionality to layer on top of Roblox's CollectionService

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages