I want to make a system, so whenever I say something in chat my message goes on to the part.
What do you mean by “goes on to part”?
Do you want it like to apply on a billboardgui/surfacegui/gui text?
I meant to put it on a surface gui
You can use the .Chatted event for this.
Make a ServerScript in ServerScriptService:
local Text = game.Workspace.www.SurfaceGui.TextLabel -- Your gui text here
game.Players.PlayerAdded:Connect(function(player) -- So the script works for every player that joins the game.
player.Chatted:Connect(function(msg) -- .Chatted event, runs when a player chats
Text.Text = msg -- Setting the Text (game.Workspace.www.SurfaceGui.TextLabel) to the msg (the message that the player sent)
end)
end)
Video of the script in work:
Can this only be used by me or the entire server?
Entire server, do you want it to be only accessible by you?
Yes that would be great, and also could you create model or give me step by step instructions?
local Text = game.Workspace.www.SurfaceGui.TextLabel
game.Players.PlayerAdded:Connect(function(player)
if player.Name == "NAMEHERE" then -- Insert name for who can use it here, you can also do "and" if you want to add another player.
player.Chatted:Connect(function(msg)
Text.Text = msg
end)
end
end)
This should be simple, you don’t really need a tutorial for it.
Note: If you were to ever make it accessible by the whole server you would need to filter the message.
2 Likes