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

HasTag

HasTag returns whether a given object has a tag

  • Using CollectionService/AddTag to add the tag will cause this method to return true.
  • Using CollectionService/RemoveTag to remove the tag will cause this method to return false.

By extension, any tags returned by a call to CollectionServiec/GetTags on an object will return true when used with this method.

Parameters

Name Type Default Description

tag

Returns

Return Type Summary

Code Samples


Using Tags and CollectionService

This code sample demonstrates adding, removing and querying a tag from an object using CollectionService. Be sure to add a Part to the Workspace before running this code.