TextChatService Icons

I would like to add TextChatService window icons if a user is verified
i.e: Matthew :ballot_box_with_check: (pretend it’s the original verified badge): Hello there!

This is an example, made with the premium icon tho:

Credits: Experimental Hugs Room - Roblox

If you can help, please answer to this topic with a simple script!

3 Likes

Well thats because roblox has them in Unicode characters so that you can use them in TextLabels.

I recommend you check this post and how you apply it in your game:

You will want to change The Prefix Of the Message sent with one of those 3 icons Unicode Characters ^

1 Like

I don’t really want to show them before the name, just after the name.

Yes so you would Change the Prefix, and have their Name first, and put the icon Last:

local ExampleString = Player.Name.."Icon Here "..":"  --":" to make it Look normal 

Thank you for helping me out! I will try it out now!

It shows this… how to fix? This is the script.
image

txtcs.OnIncomingMessage = function(message: TextChatMessage)

	local properties = Instance.new ("TextChatMessageProperties")

	if message.TextSource then

		local playermessaged = game:GetService("Players"):GetPlayerByUserId(message.TextSource.UserId)

		if playermessaged.MembershipType == Enum.MembershipType.Premium then

			properties.PrefixText = playermessaged.DisplayName.." utf8.char(0xE001)"..":"  --":" to make it Look normal 
		end
	end

	return properties
end
1 Like

If I remember correctly it should be:

playermessaged.DisplayName..utf8.char(0xE001)..":"

If not try:

playermessaged.DisplayName..utf8.char("0xE001")..":"

Oh okay, thanks! I will try to do it with that method.

Works fine, the icon shows, but how to make it white as it shows the color with the chat color.

Use rich text

playermessaged.DisplayName.."<font color='#FFFFFF'>"..utf8.char(0xE001).."</font>"..":"

I think that should work?

2 Likes

Thank you so much! Everything works. I’ve been searching this for a long time and I finally learned how. Thank you very much!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.