I have this script where when you type a specific message in chat it should teleport you to a specific part that I have positioned somewhere (the script is in ServerScriptService), but for some reason even if I say one letter from the actual word it still teleports me, I want it to only teleport if you say the whole thing in chat exactly as I wrote it in the script, how do I fix this issue?
Example: The player is supposed to chat “INSANE OBBY!!!” in chat for it to work, but even if the player chats “ins” or “o” or “obby” or any letter from the word it still teleports him.
Current script:
local partToTp = game.Workspace.InsObbyTP
local DesiredMessage = "INSANE OBBY!!!"
local players = game:GetService('Players')
players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if string.find(string.lower(DesiredMessage),string.lower(message)) then
player.Character:PivotTo(partToTp.CFrame)
end
end)
end)