TextChatService non player character message customizability

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I’m trying to change the system message system from the legacy chat system to the new chat system thing.

  1. What is the issue? Include screenshots / videos if possible!

I cant figure out how to get it work. It is most probably the way the local script is used which is pasted into player guis then enabled. And even if I could get it to work I have no idea how to customize it. I assume it’s something to do with the metadata thing but I have no idea what to put there.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I have tried searching on just about everything I could find. Tried the studio help button thing I dont know what to call it, Tried searching around here too and even outright searched it but for some reason it messes up the search engine.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

This is the script Im trying to use thats pasted into the PlayerGui object of the Players.

local Players = game:GetService("Players")

local generalChannel:TextChannel = game.TextChatService.TextChannels.RBXGeneral

generalChannel:SendAsync(script.Chat.Value)

The free model script im trying to learn from. It’s in StarterPlayerScripts.

local message

while true do
	--Inform Message If you want to delete this, delete the 'wait (179)' line at the end too!
	wait (1)
	message = '[Server] Make sure to read these messages in the chat for random facts and more :D' 
	game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage(message,{
		Text = "e";
		Color = Color3.new(0.333333, 0.666667, 0.498039);
		Font = Enum.Font.SourceSansBold; 
		FontSize = Enum.FontSize.Size18;
	})
	
	
	
	-- Messages (delete some if there are too much)
	

	wait (180)
	message = '[Server] You can Enable music in settings :)'
	game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage(message)
	
	
	wait (180)
	message = '[Server] Bored and have nothing to do? Invite some friends to play hide and seek!'
	game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage(message)
	
	
	wait (180)
	message = '[Server] join the group Vibey Games if you wanna give feedback :)'
	game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage(message)
	
	
	wait (180)
	message = '[Server] frogolia (land of frogs) should be a country'
	
	
	wait (180)
	message = '[Server] school sucks'
	game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage(message)
	
	
	wait (180)
	message = '[Server] ducks are cool'
	game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage(message)
	
	
	wait (180)
	message = '[Server] fun fact: you are reading this O:'
	game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage(message)
	
	
	wait (180)
	message = '[Server] If you found any bugs or errors, make sure to contact me on the group wall!'
	game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage(message)
	
	
	wait (180)
	message = '[Server] p i a n o'
	game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage(message)
	
	-- end
	
	
	
	
	wait (179)-- Wait for the inform message (remove me if you want the 'Inform message'!)
end

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

Nevermind I think I found the solution… It just wont be easy.

What do you mean it won’t be easy?

In your first script above I see SendAsync, rather than DisplaySystemMessage being used.
The other script uses a table of data to send, similar to the legacy chat function, rather than a metadata string, which may cause it to throw an exception.

local TextChatService = game:GetService("TextChatService")
local MainChannel = TextChatService.TextChannels.RBXGeneral

MainChannel:DisplaySystemMessage(`<font color="rgb(85,170,127)" face="SourceSansBold" size="18">[Server] Make sure to read these messages in the chat for random facts and more :D</font>`)

You have to understand that the new messaging uses Rich Text Markup rather than a table of settings.

Useful links:

Edit: Also remember to close your topic after you don’t need help anymore.

I dont use these topic things often. This one was very half baked as I already solved half the issues you mentioned. I just ended up figuring out this HTML font tag thing and thats uh… Hard for me to understand. Still trying to wrap my head around it.

1 Like

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