Pathfinding NPC chatting

I have seen games with custom NPCS chatting with Roblox chat feature, and want to know how to do it, anyone got any ideas? I looked at the Wiki on :Chat() but it didn’t seem to give much help.

Found a example on google

1 Like

NPC Dialog boxes Do you want like this or something?

1 Like

Yes but no, I just want the NPC to chat if something specific happens, not really player talking with NPC.

Example? like what? I dont understand.

1 Like

Heres a good example I found which is basically what I want.
https://gyazo.com/498910004aa17d020751ecc1f872ab99?token=329b56068f4dd569e3c7ca5540ac2ca3

I think that could be a Billboard-Gui?

It looks too much like normal bubblechat to me, some users on another post said it was :Chat() but I couldn’t find a way to make it work.

EDIT: actually, :Chat() could work, give it a try.

image

This???

1 Like

There are a few tutorials about this

however they don’t support bubble chat is that okay?

1 Like

He want like this. Like if the NPC stand in front of the counter there that idk. sorry about my bad english

1 Like

This is the best tutorial for him or you

if you want to make it bubble chat you would have to make a gui

this tutorial also includes E interactions too

1 Like

No no I mean like at bloxburg

image

1 Like

Thats how it works if he wants to make a order chat he would have to edit the scripts from the tutorial

1 Like

That is definitely a billboard gui, it has images. But if you want normal chat, use Chat:Chat() and read the wiki on how to actually use it.

1 Like

I mean when the NPC come the bubble appear automaticly

1 Like

This is where Magnitude comes in this will detect how range that we could talk

since its so close im making the distance should be atleast be 6 studs

1 Like

You could use the Chat service, for example:

local chat = game:GetService("Chat")
local chatpart = Instance.new("Part",workspace)

chatpart.Touched:connect(function(hit)
 if hit.Parent:FindFirstChild("Humanoid") then
 chat:Chat(chatpart,("Hey, "..hit.Parent.Name), Enum.ChatColor.White) --makes the part greet the player, dumb example, i know
end
end)
1 Like

You might wanna just use a billboard gui.

1 Like

Thanks for all the help, I’ll try both & see what works best.