#Npc System
1 messages · Page 1 of 1 (latest)
Use a RemoteEvent in ReplicatedStorage to send the player’s message to the server. On the server, have a script that checks the message against a list of triggers, like greetings. When it matches, the server tells the NPC to play a Sound (voice line) using .Play() on the NPC’s Sound object.
For more advanced responses, you can store triggers and responses in a table, like:
local responses = {
["hello"] = "Hello there, player!",
["bye"] = "Goodbye! See you soon!"
}
i could make a sample script for you?