Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

NPC chatting back to you?

Asked by 4 years ago

I have been wanting to have a NPC responding to somthing in chat, such as saying hello in chat would get the NPC to talk. I have not been able to find anything about this. If you could help it would be great.

0
are you going for defined answers or literally make an AI maumaumaumaumaumua 628 — 4y

3 answers

Log in to vote
0
Answered by 4 years ago

To do this, insert a dialogue into your npc inside the item it will show a few options you can change. Hope this helped!

Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

Roblox added the chat system API a while ago (guessing about 2016) where you can have more (or full) control of the chat (including bubble chat). I recommend to read the "Lua Chat System" article first as it will guide you on how it works -- which can be read here: https://developer.roblox.com/en-us/articles/Lua-Chat-System

For detailed information of functions within the API, the entire Chat Service API can be found here: https://developer.roblox.com/en-us/articles/Lua-Chat-System/API/ChatService

If you have any questions or issues contact me. ;)

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

Try using the Player.Chatted event (connect the event on PlayerAdded) to detect when the player chats. The event should check what the player says (with an if statement), and if it is a certain string (you should lower the string of what the player said) you can use a RemoteEvent and fire every client to run StarterGui:SetCore("ChatMakeSystemMessage", <insert message settings here>). You can see the message settings by going here and scrolling down to ChatMakeSystemMessage.

0
Ill try my best O_OIMGONE 9 — 3y

Answer this question