Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

chat tag not working can i have some help?

umm hi recently i tried to put an Owner name tag on roblox chat and i dont know whats wrong with the script can someone help me ?

the script: local chatService = require(game.ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))

local tags = { [0] = {TagText = "Owner", TagColor = Color3.fromRGB(170, 0, 250)}, -- The 0 must be changed to the the id of the user you want the tag to have }

chatService.SpeakerAdded:Connect(function(horthd_new) local speaker = chatService:GetSpeaker(horthd_new) local player = game.Players[horthd_new]

if tags[horthd_new.817233455] then
	speaker:SetExtraData("Tags",{tags[Horthd_new.817233455]})
end

end)

1 answer

Hey there! I have my own script that I use in my game that you can copy. I made this script 5 months ago and I forgot how it works.

Also, remember to put this script into ServerScriptService.

local ServerScriptService = game:GetService("ServerScriptService")
local ChatService = require(ServerScriptService:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
local Players = game:GetService("Players")

local Owner = {'YOUR MOM'} --Change YOUR MOM to your username.

ChatService.SpeakerAdded:Connect(function(PlrName)
	local Speaker = ChatService:GetSpeaker(PlrName)
	for _, v in pairs(Owner) do
		if Players[PlrName].Name == v then
			Speaker:SetExtraData('Tags', {{TagText = "Owner", TagColor = Color3.fromRGB(255, 209, 0)}}) -- Change this RGB value to the desired color.
		end
	end
end)

1 comment

0

Should probably use player's userid instead of player's name to make it works all the time even the player changed their name

This discussion is preserved as it was. New answers, comments, and votes are closed.