diff --git a/content/en-us/reference/engine/classes/CollectionService.yaml b/content/en-us/reference/engine/classes/CollectionService.yaml index 3aefa0382..63d72de06 100644 --- a/content/en-us/reference/engine/classes/CollectionService.yaml +++ b/content/en-us/reference/engine/classes/CollectionService.yaml @@ -51,10 +51,16 @@ methods: signal created by `Class.CollectionService:GetInstanceAddedSignal()` with the given tag. - **Warning:** When tagging an instance, it is common that some resources - are used to give the tag its functionality, e.g. event connections or - tables. To prevent memory leaks, it is a good idea to clean these up - (disconnect, set to nil, etc) when no longer needed for a tag. Do this + ##### Warnings + + - An instance's tags that were added client-side will be dropped if the server + later adds or removes a tag on that instance because the server replicates all + tags together and overwrites previous tags. + + - When tagging an instance, it is common that some resources + are used to give the tag its functionality, for example event connections or + tables. To prevent memory leaks, it's a good idea to clean these up + (disconnect, set to `nil`, etc.) when no longer needed for a tag. Do this when calling `Class.CollectionService:RemoveTag()`, calling `Class.Instance:Destroy()` or in a function connected to a signal returned by `Class.CollectionService:GetInstanceRemovedSignal()`. diff --git a/content/en-us/reference/engine/classes/Instance.yaml b/content/en-us/reference/engine/classes/Instance.yaml index 57fda7d7e..3965885a2 100644 --- a/content/en-us/reference/engine/classes/Instance.yaml +++ b/content/en-us/reference/engine/classes/Instance.yaml @@ -321,7 +321,13 @@ methods: already applied. Successfully adding a tag will fire a signal created by `Class.CollectionService:GetInstanceAddedSignal()` with the given tag. - Note that when tagging an instance, it's common that some resources are + ##### Warnings + + - An instance's tags that were added client-side will be dropped if the server + later adds or removes a tag on that instance because the server replicates + all tags together and overwrites previous tags. + + - When tagging an instance, it is common that some resources are used to give the tag its functionality, for example event connections or tables. To prevent memory leaks, it's a good idea to clean these up (disconnect, set to `nil`, etc.) when no longer needed for a tag. Do this