-- Client
local TextChatService = game:GetService("TextChatService")
local TextChannels = TextChatService:WaitForChild("TextChannels")
local RBXGeneral = TextChannels and TextChannels.RBXSystem
game:GetService("ReplicatedStorage").RemoteEvent.OnClientEvent:Connect(function(msg, playername)
print("Hello?")
print(msg, playername)
local Result = RBXGeneral:DisplaySystemMessage(msg..playername)
print(Result.Status)
end)
I assume whenever a ‘message’ is sent to a TextChannel it carries a ‘status’, which in your case it was Enum.TextChatMessageStatus.Success which means the message was delivered. Quite odd and I’m not quite sure why it’d print ‘success’.
Just make sure you have your ChatVersion on TextChatService:
And I’m not sure why you’re using local RBXGeneral = TextChannels and TextChannels.RBXSystem.
Just use:
local textChannels = TextChatService:WaitForChild("TextChannels")
local generalChannel = textChannels:WaitForChild("RBXGeneral")
i am so confused rn still doesn’t work Status prints Success btw
local TextChatService = game:GetService("TextChatService")
local TextChannels = TextChatService:WaitForChild("TextChannels")
local RBXGeneral = TextChannels:WaitForChild("RBXGeneral")
game:GetService("ReplicatedStorage").RemoteEvent.OnClientEvent:Connect(function(msg, playername)
print("Hello?")
print(msg, playername)
local Result = RBXGeneral:DisplaySystemMessage(msg..playername)
print(Result.Status)
end)
-- client:
game.Players.PlayerAdded:Connect(function(player)
game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage(`{player.Name} just joined the game.`)
end)
players.PlayerAdded does indeed work on the client. But you’re probably testing this in a solo place. Which means that the event loads in after the player joins, therefore the event doesn’t get fired for your own player. But for other players, it will display it.
You should still avoid using a RemoteEvent, you don’t need it. The client will not fire PlayerAdded for itself though. But, why would one need a welcome message for theirself?