From f9cd5a83e04856353e1c46e668e3ab06fbd2e426 Mon Sep 17 00:00:00 2001 From: Elvis Tony Date: Wed, 29 May 2024 10:28:41 +0100 Subject: [PATCH] Create ninjas_talk_chat.cs --- ninjas_talk_chat.cs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 ninjas_talk_chat.cs diff --git a/ninjas_talk_chat.cs b/ninjas_talk_chat.cs new file mode 100644 index 0000000..bebaf35 --- /dev/null +++ b/ninjas_talk_chat.cs @@ -0,0 +1,7 @@ +local ChatService = game:GetService("Chat") +local head = script.Parent.Head +local prompt = head.ProximityPrompt +local chatList = {"Hello, I'm Sensei Matt!", "Hi-Yah!"} +prompt.Triggered:Connect(function() +ChatService:Chat(head, chatList[math.random(1, #chatList)]) +end)