Want a special badge and 30 bux? Make some PolyWorld! Content and post it in the Creations forum!
Dark mode is incomplete! Please report any issues to the Discord.

PartTaggingModule

Scripts Not creatable

PartTaggingModule lets you tag Instances with string labels and find them later.
Useful for killbricks, checkpoints, doors, and other designer-marked groups.
Available as the global PartTaggingModule.


Overview

Methods

Events


API

Methods

AddTag

AddTag(instance: Instance, tag: string) : void
Adds a tag to the Instance.
Adding the same tag twice does nothing.

PartTaggingModule:AddTag(part, "Killbrick")

RemoveTag

RemoveTag(instance: Instance, tag: string) : void
Removes a tag from the Instance.

HasTag

HasTag(instance: Instance, tag: string) : bool
Returns true if the Instance has the tag.

GetTags

GetTags(instance: Instance) : List of string
Returns every tag on the Instance.

GetTagged

GetTagged(tag: string) : List of Instances
Returns every Instance in the place that currently has the tag.

for _, part in ipairs(PartTaggingModule:GetTagged("Checkpoint")) do
    part.Touched:Connect(function(player)
        player:SetSpawn(part.Position.X, part.Position.Y, part.Position.Z)
    end)
end
Events

TagAdded

TagAdded : Event (instance: Instance, tag: string)
Triggers when a tag is added to an Instance.

TagRemoved

TagRemoved : Event (instance: Instance, tag: string)
Triggers when a tag is removed from an Instance.