Create ninjas_talk_chat.cs

This commit is contained in:
Elvis Tony 2024-05-29 10:28:41 +01:00 committed by GitHub
parent 125d8a9aa2
commit f9cd5a83e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

7
ninjas_talk_chat.cs Normal file
View file

@ -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)