Chattag feedback! (Scripted)

I made a script for a chattag when ever you chat there will be a tag for example if you say “Hi” the format will be like [Owner] DevMcCollins1: Hi

Do you think there should be anything added or improved or is it good?

6 Likes

It’s good that you added labels to the chat! Could I use this in my own game?

1 Like

Sure, you use if you want I hope it works well.

1 Like

image What am I doing wrong ;-;

1 Like

You need another } before the return to close the module table.

2 Likes

image This is proof that I don’t know what I’m doing PX

On top of your script local ChatService = game:GetService(“Chat”)

1 Like

image Oh good! Now what?

First step:

Head to “ServerScriptService”, then insert the object named “Script” rename it to “Chattag” once you have done that put this in the script:

local ServerScriptService = script.Parent
local ChatServiceRunner = ServerScriptService:WaitForChild(“ChatServiceRunner”)
local ChatService = require(ChatServiceRunner:WaitForChild(“ChatService”))

local Tags = require(script.Tags)

local function CheckForTags (Player)
– run the code in here.
local Attempt = Tags[Player.UserId] or Tags[Player.Name]

if Attempt then
	local SpeakerObject
	
	repeat
		wait()
		
		SpeakerObject = ChatService:GetSpeaker(Player.Name)
	until SpeakerObject ~= nil
	
	
	SpeakerObject:SetExtraData("Tags", {Attempt})
	
else
	
	print("No tags found for user"..Player.Name.."!")
end

end

game.Players.PlayerAdded:Connect(function(Player)
– run code in here.

CheckForTags(Player)

end)

for _, Player in pairs(game.Players:GetPlayers()) do
CheckForTags(Player)
end

Second step:

Click the plus on the Script named “Chattag” and insert the module script once you have done that name it “Tags” then insert this script:

local module = {
[“CovertCode”] = {
[“Add user ID or username”] = “Owner/Developer”;
[“TagColor”] = Color3.fromRGB(34, 255, 240);

};

["Add user ID or username"] = {
	["TagText"] = "Scripter";
	["TagColor"] = Color3.fromRGB(49, 255, 24);
	
};

["Add user ID or username"] = {
	["TagText"] = "VIP";
	["TagColor"] = Color3.fromRGB(252, 0, 232);

};

}
return module

If you have any questions reply here.

1 Like

@evanzane07 Here, you go hope it helps!

1 Like

It does help! It doesn’t show any errors so that’s a plus! But there’s a new problem that just doesn’t make sense to me. Whenever I try to test it and start playing my game the scripts disappear! I feel like this is getting worse every time I get help. PX

It’s a ROBLOX bug make it into a file.

I suggest using UserId instead of the player’s name as it will still work if the player changes their name.

Do you mean Folder? Because if so then that didn’t work…
image

No, folders just put it in the serverscriptservice and done!

Look good, the code can be always improved and made more efficient. Keep up the good work.

But it doesn’t work. It always disappears when I start playtesting. I know it should be there but it isn’t. What should I do? I feel like I am missing something…

Did you remove the folder? That maybe the problem if not show me the picture of the code you put in.


This is what I put in…

Did you put your username in the tags script?