What I’m trying to do is make an NPC that can talk and comment like any player with ChatBubbles. I’ve tried using ChatSpeakers and things like that but it just doesn’t make chat bubbles. It appears in the chat window, but not as a ChatBubble. I’d really like to be able to have the ChatBubbles because it makes it more believable as a player. I’ve seen it done before, i just have no idea how. I’ve also combed the Forum but nothing seems to fit this exact problem… Any help?
SSS = game:GetService("ServerScriptService")
ChatServ = require(SSS:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
if not ChatServ:GetChannel("All") then
while true do
local ChannelName = ChatServ.ChannelAdded:Wait()
if ChannelName == "All" then
break
end
end
end
local System = ChatServ:AddSpeaker("Frederick234")
System:JoinChannel("All")
System:SetExtraData("NameColor", Color3.fromRGB(255, 0, 0))
System:SetExtraData("ChatColor", Color3.fromRGB(255, 0, 0))
wait(30)
System:SayMessage("test", "All")
This is my current code, which makes text in the chat window and leaves no errors, but doesn’t make a chat bubble. Chat Bubbles are true in the settings in my place, and any normal user can make them.
frederick the silent
I’ve also heard it might just be that those other chat things I’ve seen are just well-made GUI replicas of actual ChatBubbles, but… I hope there might be another way cause that’s quite a lot of load time added per npc.
@tribalwo1f did you add a function to create a bubble message, from what I can see you dont have one and you dont appear to have bubble chat enabled. Bubble chat is a Gui within the player.
SSS = game:GetService("ServerScriptService")
ChatServ = require(SSS:WaitForChild("ChatServiceRunner"):WaitForChild("ChatService"))
if not ChatServ:GetChannel("All") then
while true do
local ChannelName = ChatServ.ChannelAdded:Wait()
if ChannelName == "All" then
break
end
end
end
local System = ChatServ:AddSpeaker("Frederick234")
System:JoinChannel("All")
System:SetExtraData("NameColor", Color3.fromRGB(255, 0, 0))
System:SetExtraData("ChatColor", Color3.fromRGB(255, 0, 0))
wait(30)
System:SayMessage("test", "All")
game.Chat:Chat(workpace.Frederick234.Head,'test',Enum.ChatColor.White) -- this line make the buble