How to setup tags in ExtraDataInitializer

While I was browsing the Lua Chat scripts I found this in ExtraDataInitializer, from what I can see, this can be used to make tags, but how could this be exactly set up?

I browsed the DevHub but I didn’t exactly find an answer to my question. What I do understand of the script, the tags have both an Color3 value and an TagText, so I’m assuming this is shown as

[Alpha Tester] Name: Message

if not speaker:GetExtraData("Tags") then
			--// Example of how you would set tags
			--[[
			local tags = {
				{
					TagText = "VIP",
					TagColor = Color3.new(1, 215/255, 0)
				},
				{
					TagText = "Alpha Tester",
					TagColor = Color3.new(205/255, 0, 0)
				}
			}
			speaker:SetExtraData("Tags", tags)
			]]
			speaker:SetExtraData("Tags", {})
		end
	end

How could I use SetExtraData to assign users tags, for example an Development Team tag or an Beta Tester tag. I do understand how the script works, I just want to know how to use it.

1 Like

Here’s an example of mine:


		if not speaker:GetExtraData("Tags") then
			local Owner = {{TagText = "Owner", TagColor = Color3.new(175/255,0, 0)}}
			local exploitTester = {{TagText = "Exploit Tester", TagColor = Color3.new(0, 170/255, 0)}}
			local IvanGregrovnich = {{TagText = "Intern", TagColor = Color3.new(175/255, 221/255, 1)}}
			local AleksejGrasnich = {{TagText = "ROBLOX Admin", TagColor = Color3.new(1, 215/255, 0)}}
			if speakerName == "FKAGamingDeOne" then
				speaker:SetExtraData("Tags", Owner)
			elseif speakerName == "192he91i2nijdn1i" then
				speaker:SetExtraData("Tags", exploitTester)
			elseif speakerName == "IvanGregrovnich" then
				speaker:SetExtraData("Tags", IvanGregrovnich)
			elseif speakerName == "AleksejGrasnich" then
				speaker:SetExtraData("Tags", AleksejGrasnich)
			else
				speaker:SetExtraData("Tags", {})
			end
		end
2 Likes

Thanks for showing, I didn’t really understand the “Hidden” documentation on the DevHub.

Here are the API documents for ChatSpeaker

Would I be allowed to use this in my games? I’ve been trying to find something that adds a tag to the player for a while.