Hello DevForum,
I spent a little while today making a script easily customisable for chat tags, this could potentially be useful to some of you guys as a way to learn scripting and add something cool to your game at the same time. This script allows you to add custom chat tags and colours for gamepasses and group ranks.
I have tried to comment as much of it as possible to explain the purpose and to try and show you how to format it to add a new gamepass/rank etc. If this is not clear enough I will attempt to explain below.
Grab the model:
(23) Chat Tags - Can Ungroup - Roblox
Add a new gamepass tag
Adding a new gamepass tag is pretty simple, firstly navigate to the main script.
Now we are going to want to find the table called “gamepassTags”
We can delete the example if needed.
The green commented off example shows the format of the needed gamepass table, by using that format open some curly brackets “{}” and inside type what the format tells you. So that is as follows {Tag Text, Gamepass ID, Colour, Weight (Weight is whether the tag will override basically, say we have owner at 3 and head admin at 2 owner will be picked as the tag because it has a higher weight)}.
If we exit now and play test we should see that if you own the inputted gamepass and it has a higher weight than any of the other tags, that when you send a message, you should have a tag in front of your name.
Something like above.
Adding multiple new gamepass behind the old ones
Firstly, we are going to want to find where the last entry in the table is.
We can see the green is commented out so it is not included in out table, so before the two “–” we should put a comma, this shows a new entry. Then we are going to want to open a pair of curly brackets “{}” and inside these, follow the template of {Tag Text, Gamepass ID, Colour, Weight}
Then we can playtest, if the gamepass is owned and the weight is higher than any other tag the user is capable off then it should show up in the chat.
Add a new group rank tag
To add a new group rank tag it is very similar to adding a new gamepass tag except it is a different format as we have to include the group rank needed.
The new group ranks format is as follows {Tag Text, Group ID, Colour, Weight, Group rank number (for example 255 would be the groups owner)}
As you can see the only two differences are the “Group ID” which is self explanatory and the “Group rank number field” which is extra at the end (after weight).
Troubleshooting
Tags aren’t being given? / Wrong tag
Make sure you have no two ranks/gamepass with the same weight as this will cause which ever ones listed first in the table to be chosen.
Make sure there is no mistakes in the format of the added tables
Make sure you haven’t forgot commas after each new entry,
Make sure that you ACTUALLY have the gamepass or rank in group!
If you can still not get it working, I understand my explanations are very poor! Please leave a comment below and I will try help you out!
Thank you for reading, I know it’s nothing major but really wanted to post a community tutorial and look forward to doing so again in the future.