My roleplay action script is still showing the bubble chat?

So I have this /me for roleplay purposes, and it used to not show the bubble chat, but now it is, any help?

function onChatted(message, player)
	local filteredText = game.Chat:FilterStringForBroadcast(message,player)
    if filteredText:sub(1,4) == "/me " then
		local roleplay = filteredText:sub(5)
		game.ServerStorage.RPText:Clone().Parent = game.Workspace[player.Name].Head
		local action = game.Workspace[player.Name].Head.RPText
		action.Frame.Display.Text = "[" .. player.Name .. "] - " .. "***" .. roleplay .. "***"
		

		wait(7)
		action:Destroy()
    end
end
 
game.Players.PlayerAdded:connect(function(player)
    player.Chatted:connect(function(message) onChatted(message, player) end)
end)

Hey there, Pooglies!

I think I might have a solution for you!

First off, the problem you are running into is because bubble chat is enabled, to fix this, first navigate in explorer to Game > Chat

Next, take this model:
https://www.roblox.com/library/3475752782/ClassicChatLoader

Put this model in the chat service and you should be good to go!

Hey DrBaja, I want there to be bubblechat, but I want it so when the player does /me (there message) the bubblechat does not show up. This used to do that, but it does not anymore.

Hm, that’s going to take some scripting of your own.
Here is what we will need for this,

First of all, we know that /e hides default, we can use this knowledge, to add in /me as well.

Here is the model for the entire chatscript, I configured to work with this:
https://www.roblox.com/catalog/03475857252/redirect

If you would like to know how this works I’ll explain bellow.

So in the ChatServiceRunner at line 330 you’ll see a RegisterProcessCommandsFunction which is where I put in my commands. All I did was add a if statement for the /me command.

Here is an example:

ChatService:RegisterProcessCommandsFunction("default_commands", function(fromSpeaker, message, channel)
	if (string.sub(message, 1, 6):lower() == "/join ") then
		DoJoinCommand(fromSpeaker, string.sub(message, 7), channel)
		return true
	elseif (string.sub(message, 1, 3):lower() == "/j ") then
		DoJoinCommand(fromSpeaker, string.sub(message, 4), channel)
		return true

	elseif (string.sub(message, 1, 7):lower() == "/leave ") then
		DoLeaveCommand(fromSpeaker, string.sub(message, 8), channel)
		return true
	elseif (string.sub(message, 1, 3):lower() == "/l ") then
		DoLeaveCommand(fromSpeaker, string.sub(message, 4), channel)
		return true
	elseif (string.sub(message, 1, 4):lower() == "/me ") then
		
		return true
	elseif (string.sub(message, 1, 3) == "/e " or string.sub(message, 1, 7) == "/emote ") then
		if not FFlagPlayEmoteChatCommandEnabled then
			-- Just don't show these in the chatlog. The animation script listens on these.
			return true
		end

	end

	return false
end)

If you would like to add an extra command, just make another elseif statement.
(Sorry for taking so long to reply, I wasn’t sure how to do it at first either.)

2 Likes