I would like to add TextChatService window icons if a user is verified
i.e: Matthew (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:
I can’t seem to find a place where these are stored, so here are the Unicode replacement characters for Robux, Premium, and Verified!
Robux:
Premium:
Verified:
In code (Courtesy of @ItsAllOnAce ):
Robux: utf8.char(0xE002)
Premium: utf8.char(0xE001)
Verified: utf8.char(0xE000)
Note that these won’t show up in the DevForum, and will only show in game, as seen here:
[image]
(The text on this textlabel is ;;;)
AND it works with UIStroke!
[image]
I think these characters a…
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.
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
system
(system)
Closed
November 2, 2023, 6:57am
#12
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.