Assuming a properly defined Component Class with the tag "Box" and a Part named "myBox" in the Workspace, the following operations unexpectedly result in differing outcomes:
-- Works as expected.
myBox:AddTag("Box")
task.wait()
myBox:RemoveTag("Box")
-- Performs Construct and Start. Fails to call Stop and associated backend cleanup operations.
myBox:AddTag("Box")
myBox:RemoveTag("Box")
-- Performs Construct. Fails to call Start and Stop.
myBox:AddTag("Box")
task.defer(function()
myBox:RemoveTag("Box")
end)
This issue has low impact. Potential solutions include adding this information to the documentation, throwing an error in InstanceTagged if the instance is missing the tag (solves the 2nd example) and doing the same in TryConstructComponent (solves the 3rd example), or providing support by short cutting to cleanup. This should not be supported in my opinion, and performing any of these actions should throw an error (solution 2).
Assuming a properly defined Component Class with the tag "Box" and a Part named "myBox" in the Workspace, the following operations unexpectedly result in differing outcomes:
This issue has low impact. Potential solutions include adding this information to the documentation, throwing an error in InstanceTagged if the instance is missing the tag (solves the 2nd example) and doing the same in TryConstructComponent (solves the 3rd example), or providing support by short cutting to cleanup. This should not be supported in my opinion, and performing any of these actions should throw an error (solution 2).