Basically i just want to check if a value equals to any value in a table. I’ll explain it a little better.
This is my script:
local tb = {"messagee", "messageee"}
local plr = game.Players.LocalPlayer
plr.Chatted:Connect(function(msg)
local message = string.lower(msg)
if message == #tb then
print("Message is in the table")
end
end)
It is not working though, i added prints into it and the error is in the if message == #tb then part, so if anyone could help me, i’d appreciate it very much.
I am not very used to using tables so that is why i am struggling with something that probably is very simple.
local tb = {"messagee", "messageee"}
local plr = game.Players.LocalPlayer
plr.Chatted:Connect(function(msg)
local message = string.lower(msg)
if table.find(tb, message)
print("Message is in the table")
end
end)