Custom Chat Tags Model!

I made two models to easily manage chat tags, and they are easy to use.
Note: Tags can be duplicated to have more than one tag on each person.

How to change chat service version:
image
---------------------------------------------------------------------------------------------------

Legacy Chat Service

---------------------------------------------------------------------------------------------------
Custom Chat Tags (for Legacy Chat Service):

Put the script in here and your all set:
image

What it contains?

  1. “AllUserFriends” is if you want to give similar tags to all that user’s friends
    Accepts ‘User ID’ in the value:
    image

  2. “Gamepasses” is if any user has that gamepass they will get the same tags
    Accepts ‘Gamepass ID’ in the value:
    image

  3. “Groups” is if any user joined the specified group they will get the same tags
    Accepts ‘Group ID’ in the value:
    image

  4. “UserIds” is for the specified user and only they will get the tags (even if they changed their name)
    Accepts ‘User ID’ in the value:
    image

  5. “UserNames” is also for the specified user, but if they changed their name they will lose their tags
    Accepts ‘User Name’ in the value:
    image

How to use it?

  • You will have these files in each folder:
    image

  • Every User has their own file that can be renamed to any name (Ex: their name) to have another user simply duplicate the user file, its this file in each folder:
    image

  • To apply the tags to them you need to enter their details in the value from the properties:
    image

  • The ‘Tags’ folder contains all the user/gamepass/group ‘tags’ that can be duplicated to give the users multiple tags:
    image

  • To change the tag name just change the name from the properties or by renaming the file of each tag (I intended to make the tags work by their names instead of value to make it easier for developers to know each user tags by their names):
    image

  • Each tag has inside it a color value to change the tag color as needed (Don’t change the name!):
    image
    .
    image

(things that are not available in the new chat system):

  • You can also change the text of the user message color (Don’t change the name!):
    image

  • Lastly, you can change the user name color in the chat (Don’t change the name!):
    image
    ---------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------

New Chat Service

---------------------------------------------------------------------------------------------------
Custom Chat Tags (for New Chat Service):

Put the script in here:
image
---------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------
If you have any questions ask me I will try to help.

9 Likes

You should explain what that does, put videos or images showing it, “nobody” gonna get a thing they don’t know how exactly works.

Even if it’s easy to work with that, they won’t use it because they don’t even know if it’s easy or not because never saw it.

5 Likes

Don’t wanna be rude, but nobody’s gonna get a model if they dont know how it works. you should at least put a few photos or just a video of how it works, nobody knows if its safe to use or not.

I will update it later, I was being lazy sorry about that…
I also explained stuff in the models description.

Edited it to explain everything, I hope it’s clear enough because it took me some time to write that :slight_smile:

Is it good now or needs a change?

1 Like

Yes, it’s really perfect!
I think it doesn’t need any change

Although the chat tags work, players cannot see other players texts :frowning:

They can check if you are using the new or old one and put it in the correct place

It’s fine now! I am not sure if I was doing anything wrong but I could not get the New Chat System to work with the newer chat. I swapped to the Legacy Chat Version and it was fine! :slight_smile:

Hey Qudo, I took a look at your code and have some feedback for you to help you improve your system. First let me say, I think it’s awesome that you created this using the Roblox ChatService and are willing to allow others to use it.

You’ve got a lot of repeated code blocks for different types of checks (friends, game passes, groups, user IDs, and usernames). You could make this code cleaner and more efficient by creating a function to handle these checks. This would also make it easier to maintain in the future.

For Example:


local function applyUserExtras(Speaker, user)
    local tags = {}
    
    if user:FindFirstChild("NameColor") then
        Speaker:SetExtraData("NameColor", user.NameColor.Value)
    end
    
    if user:FindFirstChild("ChatColor") then
        Speaker:SetExtraData("ChatColor", user.ChatColor.Value)
    end
    
    if user:FindFirstChild("Tags") then
        for _, tag in pairs(user.Tags:GetChildren()) do
            table.insert(tags, {TagText = tag.Name, TagColor = tag.Color.Value})
        end
        Speaker:SetExtraData("Tags", tags)
    end
end

You’re also using loops with breaks inside, which might not be the most efficient way to achieve your goals. You could optimize this by using functions like pairs to iterate over tables and use early returns instead of breaks to exit the loop when the desired condition is met.

For use in larger games, your code may be a little slow since it’s so linear. You could look into ways to optimize this for performance using data structures like dictionaries might help.

I hope these suggestions prove valuable in improving your system. Keep up the great work, and don’t hesitate to reach out if you have any questions.

Thank you Blaze for the suggestion, I know my code isn’t the best and always can be improved, but that was my level at that time.
Also, this code meant to run once when you join, so I don’t think it will make big difference to optimize it, but I will take your consideration in mind and if I was empty I’ll change it and take your help :+1:

1 Like

Since model reviews insisted that it doesn’t work (and it’s not my mistake they didn’t read that there are two versions) I added warning in each model that notify you if your chat service is in the wrong version.