How can I make a NPC talk when it reached a certain location after walking? I tried it by using local script and program it to talk when it touch a part but it doesn’t seem to work. may I know how to solve it? (Btw the NPC is able to walk to its destination correctly)
Here is the script
local textchatservice = game:GetService("TextChatService")
script.Parent.Touched:Connect(function(hit)
if hit.Parent.Name == "Rig" then
print("Yes")
textchatservice:DisplayBubble(hit.Parent:WaitForChild("Head"),"Hello! How are you?")
end
end)