How can I tag stuff with Command Bar?

How can I tag something with the Command Bar? (Im using the Instance Tagging Plugin…)

For example…

for i,v in pairs(game.Workspace:GetDescendants()) do
     if v.Name == "Flower" then
          -- This is where that Flower Object gets its tagged. Idk what to put here
     end
end

What exactly are you referring to when you say “tag”?

Your explanation of “tag” is very vague. Are you saying you want something to represent all the objects in the workspace named flower?

In that instance, you can just create a variable that equals v:

for i,v in pairs(game.Workspace:GetDescendants()) do
     if v.Name == "Flower" then
         local Flowers = v
     end
end

game:GetService('CollectionService'):AddTag(game.Workspace.Part, 'TAG CATEGORY')

1 Like

Use TextService and TextService:FilterStringAsync()

Your code would look like this:

local TextService = game:GetService("TextService")
for i,v in pairs(game.Workspace:GetDescendants()) do
     if v.Name == "Flower" then
          local filteredText = TextService:FilterStringAsync(v.Name, 1) --the first argument is the text you want to tag (filter) the second argument is the players userId which will tag the text differently depending if they are under 13 or not. Keep it as 1 if you want all text to be filtered as if the user is over 13.
     end
end