How do I fix this SEND button?

Hello Developers!

I have just moved on to another project. It is a friendly robot that you can talk to! I was making the script, when I was making an if statement to see if the player has written “hi”, “hello”, “Hello”, or “Hi” I wrote this, And it did not work.
Screenshot_97

--Script by TrackoTheTaco

--//Locals\\--
local Frame = script.Parent.Frame
local TextBox = script.Parent.Frame.TextBox
local SendBtn = script.Parent.Frame.TextButton
local player = game.Players.LocalPlayer

--//If the player clicks the Send Button\\--
SendBtn.MouseButton1Click:Connect(function()
	if 	TextBox.Text == {"hi","hello","Hello","Hi"} then
		TextBox.Text = "Hello! I'm Tralmo Bot! :D"
	end
end)

I never saw a script like this. I suggest using this script
(there might be some errors, I am writing on mobile).

local Frame = script.Parent.Frame
local TextBox = script.Parent.Frame.TextBox
local SendBtn = script.Parent.Frame.TextButton
local player = game.Players.LocalPlayer

local function CheckForText (Text)
local words = {"hi","hello","Hello","Hi"}
local pass = false

for i,v in pairs (words) do
if v == Text then
pass = true
end
end
return pass
end
--//If the player clicks the Send Button\\--
SendBtn.MouseButton1Click:Connect(function()
	if CheckForText(TextBox.Text)  then
		TextBox.Text = "Hello! I'm Tralmo Bot! :D"
	end
end)

Basically, you can not compare a text input that easily to a table. That is why you should loop through the table.

You might also want to split the input, so you can compare each word with the table.

How would I add more things that the people can say?

Extend the table…

local table = {"1","2","3","4"}

or you make a new table, depending on the use case.

However, this is only for coding questions and not use case questions.

Make a new table then.

local table2 ={"What is Roblox?","what is Roblox lol?"}

But when I make a new table, It will still say “Hello! I’m Tralmo Bot! :D” and It will not work with multiple tables because
SendBtn.MouseButton1Click:Connect(function()
if CheckForText(TextBox.Text) then
TextBox.Text = "Hello! I’m Tralmo Bot! :D"
end
end)
does not mention the local: WIR (what is ROBLOX) that I created.

You will have to adjust the script then…

I think you need try to change it on this one

local Frame = script.Parent.Frame
local TextBox = script.Parent.Frame.TextBox
local SendBtn = script.Parent.Frame.TextButton
local player = game.Players.LocalPlayer

--//If the player clicks the Send Button\\--
SendBtn.MouseButton1Down:Connect(function()
	if 	TextBox.Text == {"hi","hello","Hello","Hi"} then
		TextBox.Text = "Hello! I'm Tralmo Bot! :D"
	end
end)

Nope, we already fixed that script.

No, SendBtn.MouseButton1Click:Connect(function() is not an error, It works fine.

I’m just going to make multiple scripts with every command, I do not mind that.