Hi this is my first post I tried to explain everything as best as I could.
-
What do you want to achieve?
When the tool is equipped, if the player types something it converts all it’s bubble chat message to a bunch of “M”'s, and when it’s unequipped it reset’s his chat back to normal. I don’t need to replicate this in the chat box, I only care about the bubble chat. -
What is the issue?
My issue here is that the default message still gets sended and the player can’t see others bubble chat -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried changing to TextChatService instead of the Legacy one but didn’t worked.
I also saw a forum where someone used a module script to set the visibility off of the text like if the player typed /e dance but I wasn’t successful
the server script that gets enabled when equipped:
local Players = game:GetService("Players")
local ChatService = game:GetService("Chat")
local char = script.Parent
local player = Players[char.Name]
player.Chatted:Connect(function(message)
--ChatService.BubbleChatEnabled = false
script.BubbleOff.Enabled = true
local modifiedMessage = string.gsub(message, ".", "M")
ChatService:Chat(player.Character.Head, modifiedMessage, Enum.ChatColor.White)
end)
char.ChildRemoved:Connect(function(child)
task.wait(0.1)
print(child)
if child.Name == "Nastro" then
--ChatService.BubbleChatEnabled = true
script.BubbleOn.Enabled = true
script:Destroy()
end
end)
the 2 locals are basically the same it changes from true to false
local ChatService = game:GetService("Chat")
ChatService.BubbleChatEnabled = false