I'm trying to make a tool that when you say a certain message a function is preformed. My code:
local text = "text"
local function onPlayerChatted(player, message)
if message:sub(1, text:len()):lower() == text then
print("working")
end
end
The message:sub part came from developer hub, I know i'm doing something wrong, but, I can't find any tutorials that work with what i'm trying to make. Is there any way I can fix this?

1 comment
What are you trying to do?