Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you get texts from the chat gui into a screengui?

I need a way of converting the chat into a gui for a type of radio I'm developing along with a friend. A talk button is also needed. I can't provide any examples as I have no idea. It also needs to appear when you sit on a vehicleseat and disappear when you exit

1 comment

0

Yes

1 answer

✓ Accepted answer

It's lucky for you that Roblox have already made a function for that ready to serve.

Here is how to use it for a certain player.

local plr = [Insert player here]
plr.Chatted:connect(function(message)
	print(plr.Name..' just said: '..message)
end)

If you want to use it for a crowd. Just add PlayerAdded function (which also already been made).

game.Players.PlayerAdded:connect(function(plr)
	plr.Chatted:connect(function(message)
		print(plr.Name..' just said: '..message)
	end)
end)

Read this wiki for more information: https://wiki.roblox.com/index.php?title=API:Class/Player/Chatted

3 comments

0

With this function. You can get the string as the message the player just sent and use it too! . You can both use this function locally or serverside.

0

be cautious though, as it returns the string from BEFORE reaching the chat filter

0

@fanofpixels Yeah. It's very important to filter the chat before it could be visualized to the real world.

This discussion is preserved as it was. New answers, comments, and votes are closed.