Remove setted chat tags

Hi, I added tags to the chat using this code:

	local textfortag = tool
	local colorfortag = titleColors[tool]
		local tags = {
            {
                TagText = textfortag, -- Tag
                TagColor = colorfortag -- VIP Color
            }
        }
        speaker:SetExtraData("Tags",tags)
end

It works for setting the tags, but I’m using it for an in-game tags shop, so I also want players to be able to unequip the tags. But here comes the errors:
Using “” (an empty string) just makes a new tag with [] (for example [][Boele009]), and using nil it will change to [???].
So: How do I let the tags disappear? Thank you in advance!

2 Likes

I don’t quite understand the question but I would assume you remove the tag from the table? I may be completely wrong here.

afbeelding
One picture says more than 1000 words, so I hope this makes it clear!

try removing the tag table and leaving it a Empty table

2 Likes
	local textfortag = tool
	local colorfortag = titleColors[tool]
		local tags = {}
        speaker:SetExtraData("Tags",tags)
end
3 Likes

Thanks @LukaDev_0 and @Tr0_p! Sometimes the answer is really simple but finding it is hard by yourself :slight_smile:

1 Like