#global chat help
1 messages · Page 1 of 1 (latest)
try checking docs before asking

no i have that already i can show you the full code
task.wait(1)
person = game.Players:FindFirstChildOfClass("Player")
game:GetService("MessagingService"):SubscribeAsync("Chat",function(mesage)
print("RECIVING: "..mesage.Data)
workspace.Part.SurfaceGui.TextLabel.Text = "Recived: "..mesage.Data
end)
person.Chatted:Connect(function(chat)
print("SENDING: "..game:GetService("TextService"):FilterStringAsync(chat,person.UserId):GetNonChatStringForBroadcastAsync())
game:GetService("MessagingService"):PublishAsync("Chat",game:GetService("TextService"):FilterStringAsync(chat,person.UserId):GetNonChatStringForBroadcastAsync())
end)
idk how to get WHO sent it though
send like lua code
what u want to achieve?
when you recive the message i want to have a variable i can use, and the variable is the username of who sent it
so just make this method for every player
what is "Chat" topic?
"Chat" topic is just the regular topic that im using for the global chat
theres only gonna be one topic
dont event understand what it is
what?
if u said its done maybe message.Data has info abt player
message.Data is just what the second to last line is sending
all the code is just to filter it through the roblox filter though

** You are now Level 5! **
just tell me bro
@frigid sparrow if theres a way tell me
?
i still dont understand what u need
ok so
if u just want to receive messages un understand who sent it
in THIS function
use this
how do i get the USERNAME of who sent it
i already have the regular global chat working fine though
if i were to use player.Name in that script, id get the username of who its getting sent to, not who is sending it
well its gonna be a global chat
everybody recives every message sent to it and anyone can send a message to it
game.Players.PlayerAdded:Connect(function(player:Player)
player.Chatted:Connect(function(message:string)
print(player.Name, message)
end)
end)```
??
yea its a max 1 server size
?
i cant understand ur problem
i think theres a way i can do this but im not sure how
this function here
i need a variable that's the player username
the username of who sent it
what
You are looking for this one... As Ekran1al already mention first time
ive read through the whole creator hub thing like three times for that
so its not possible at all?
hang on
i think i just thought of something i can do
bro
explain what u need
noone can help u if we dont understand what u want
im stupid and never needed this in the first place
sorry about wasting your time

