Hi all,
Recently, bubble chat had a huge rework. It looked really nice, so I decided to implement it in my game. It works just fine except when it comes to NPCs.
I’m working on a very unique Street Soccer game and one of the NPCs is the Referee. The referee “talks” with bubble chat whenever someone scores, whenever the ball goes out of bounds, whenever time’s up, etc.
BEFORE THE NEW BUBBLE CHAT:
AFTER THE NEW BUBBLE CHAT:
Here you can notice that both the old and the new bubble chat comes whenever the NPC talks which looks really weird. This issue doesn’t happen on real players but only NPCs. Here’s the code:
BubbleChat enabler Local script:
local ChatService = game:GetService("Chat")
ChatService.BubbleChatEnabled = true
Referee’s script (not full obviously but just the part where he chats):
local refTexts = {"Nice goal, ", "Sick goal, ", "Good goal, ", "Nice job, ", "Good job, ", "Impressive, ", "What a goal, "}
local chosenText = refTexts[math.random(1,#refTexts)]
game:GetService("Chat"):Chat(ref.Head, chosenText..goalScorer.Name.."!", Enum.ChatColor.White)
How can I make sure that only the new bubble chat pops up on the referee’s head?
Thanks in advance!