Better Chat V3 | Custom chat with replies, rich text, message editing, and more!

I have added a new feature to it
Module: https://www.roblox.com/library/9893385969/Better-Chat-V3-1-Source

5 Likes

heya! i was using the system, and set up tags for all my group ranks (admin, mod, developer, VIP) which means i had to add ranks, now i have every single rank tag thats on the list! how do i fix this?

Groups = {
			[13112234] = { --> community group
				[2] = "VIP",
				[3] = "Mod",
				[4] = "Admin",
				[5] = "Developer",
				[6] = "Owner"
			}
		},
[1] = "Guest", --> Rank ID 1 will automatically be assigned to each user (the config below can determine their final permission level)
			[2] = "VIP",
			[3] = "Mod",
			[4] = "Admin",
			[5] = "Developer",
			[6] = "Owner" --> Automatically assigned to the group creator or game creator

after some further investigation, i learned that it stacks your tags, might i suggest you add a toggle in the config script so i can set it to highest rank?

to anybody as dumb as me while trying to do this: set your max tags to one and then priority it :skull:

1 Like

How can you make it so when you die, it chats out a random death message?

Something like this:

--Messages
local DeathMessages = {"Died. ","saw cringe.","said /e free.","watched the reactor explode.","went to the wrong game.",",really, can you live a little longer?",}  --you can add more if you like :D

--Actual script
game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function()
		if script:FindFirstChild("SendDeathMessage") and script:FindFirstChild("DeathMessage") then
			script:FindFirstChild("SendDeathMessage").Parent = game.ReplicatedStorage
			script:FindFirstChild("DeathMessage").Parent = game.StarterGui
			if player.Character:FindFirstChild("Humanoid") then
				local hum = player.Character:FindFirstChild("Humanoid")
				hum.Died:Connect(function()
					local DeathMessage = DeathMessages[math.random(1,#DeathMessages)]
					local Users = game.Players:GetChildren()
					for i, User in pairs(Users) do
						if game.ReplicatedStorage:FindFirstChild("SendDeathMessage") then
							game.ReplicatedStorage.SendDeathMessage:InvokeClient(User, player.Name .. " " .. DeathMessage)
						end
					end
				end)
			end
		elseif game.ReplicatedStorage:FindFirstChild("SendDeathMessage") and game.StarterGui:FindFirstChild("DeathMessage") then
			if player.Character:FindFirstChild("Humanoid") then
				local hum = player.Character:FindFirstChild("Humanoid")
				hum.Died:Connect(function()
					local DeathMessage = DeathMessages[math.random(1,#DeathMessages)]
					local Users = game.Players:GetChildren()
					for i, User in pairs(Users) do
						if game.ReplicatedStorage:FindFirstChild("SendDeathMessage") then
							game.ReplicatedStorage.SendDeathMessage:InvokeClient(User, player.Name .. " " .. DeathMessage)
						end
					end
				end)
			end	
		end
	end)
end)

After a bit of fiddling I figured this out for you.

In the BetterChatV3 Folder, navigate to Addons > Server and create a ModuleScript. Here is the code for the death messages:

local Players = game:GetService("Players")
local DeathMessages = {"Died. ","saw cringe.","said /e free.","watched the reactor explode.","went to the wrong game.",", really, can you live a little longer?",}  --you can add more if you like :D

return function(api)
    local success, speaker = api.speaker.new("System") -- :systemMessage doesnt work for some reason
    if success then
        speaker.isPlayer = false
        local function playerAdded(player)
            player.CharacterAdded:Connect(function(character)
                local humanoid = character:FindFirstChild("Humanoid")
                if humanoid then
                    humanoid.Died:Connect(function()
                        local deathMessage = DeathMessages[math.random(1, #DeathMessages)]
                        speaker:say("Main", player.Name .. " " .. deathMessage)
                    end)
                end
            end)
        end
        Players.PlayerAdded:Connect(playerAdded)
        for _, player in Players:GetPlayers() do
            playerAdded(player)
        end
    end
end

P.S. You’re using RemoteFunctions incorrectly. RemoteFunctions are only useful if data will be sent back through a return. RemoteEvent is when you pass data and don’t expect anything in return.

2 Likes

One last thing, how do you get rid of the system chat tag when this is triggered?

Nvm I figured it out

Thank you for being awesome with helping people while I’m gone! From your replies, you seem to know the system really well. On top of this, when I return would you be interested in joining me as a developer for the chat system or when just for addons?

2 Likes

Can you send me a repro to check out when I have time?

What kind of themes do you mean? Like colors or entire overhaul?

It shouldn’t be that difficult, I just don’t know how to make it work better than that.

1 Like

Status update:

My laptop’s hard drive just failed and the laptop will no longer start up right now. This will even further delay updates unfortunately. No clue when (or if) we’ll be able to get a replacement hard drive for it.

Apologies, Jumpathy.

6 Likes

Can you add VR support possibly? I can’t chat in VR nor see the chat in VR.

Oh? I’ve never been able to test in VR. Is there a way you can get screenshots / help me debug later?

1 Like

This is like a chat I found on one of these hand VR games

And this is a game with better chat in VR

I have noticed that there is no button to chat with better chat on VR as well as there not being chat bubbles for the exception of when someone is typing.

And this is a basic VR controller layout.

This may help out greatly for games with VR support and have better chat installed.

1 Like

Can’t believe I just found this. I have added it into the public version of v4.0 when that releases in my game tomorrow.

Also, will this be ported to the new Roblox chat as well? I will be using this rather than the new Roblox chat.

1 Like

It shouldn’t have to be ported to ROBLOX’s new chat system. First that new garbage chat system is garbage, and second, BetterChat handles it’s own filtering using ChatService/TextService.

As long as ChatService and TextService API/Docs don’t change with the new chat system, specifically :FilterStringForBroadcast() and :FilterStringAsync() respectively, then the chat wouldn’t have to be ported to that garbage. Even then, all that would have to be done is just update according to the new docs, everything else would stay the same.

Just assuming based on what I’ve seen going through the BetterChat code and knowing how garbage this new ROBLOX chat is (opinion).

2 Likes

Ah, I was just wondering since Roblox said they will eventually remove LegacyChatService.

I just want to make it clear that they will deprecate the LegacyChatService, not remove it. Removing it will break numerous games on the website which would be pretty bad. We wouldn’t want that to happen would we? :upside_down_face:

3 Likes

Can someone please add VR support? It would help out A lot.

I don’t know if this is an error on my part but the chat doesn’t pop up in game, everything works fine in studio though. This is from the client-side, no errors server-side.

1 Like

I found the error, its on Line 45 in the localization scripted located in Main Module > Client > Modules Core. For some reason "game:GetService(“LocalizationService”).RobloxLocaleId returns “” instead of the actual LocaleId. I simply replaced that little piece with “en-us” and it fixed all the errors within the chat.