Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 5 years ago

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

0
Yes NewBuildmini 5 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago
Edited 5 years ago

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

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. magicguy78942 238 — 5y
0
be cautious though, as it returns the string from BEFORE reaching the chat filter fanofpixels 718 — 5y
0
@fanofpixels Yeah. It's very important to filter the chat before it could be visualized to the real world. magicguy78942 238 — 5y
Ad

Answer this question