So I have this script that makes a gui with a player thing, its for roleplaying purposes, but the message is showing up the player typing /me, etc. Any help with hiding the chat bubble?
function onChatted(msg, player)
local filteredText = game.Chat:FilterStringForBroadcast(msg,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)
I’m pretty sure there is a setting somewhere to turn on the /me command (through the core chat scripts), but that wouldn’t hide the bubble chat. To hide the bubble, you would have to fork the actual chat scripts, or send chat through a remote event and then send that to the chat scripts.
There is no built in way to remove players messages or bubble chat after they send it. The only way you could do this is through a alternative core script or text box and remote event. You could also try searching for when the billboard gui is created and destroy it, but that could be unreliable.
This has been asked before. Please do search first.
The last thread in this list is relevant because it prevents sending a message although with a different criteria. You can apply the same principle by checking if the message starts with /me. If it does, then prevent the message from being sent.