Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

NPC chatting back to you?

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.

1 comment

0

are you going for defined answers or literally make an AI

3 answers

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

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. ;)

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.

1 comment

0

Ill try my best

This discussion is preserved as it was. New answers, comments, and votes are closed.