-
What do you want to achieve?
So i have a ui with a TextBox that detects strings and depending on what is said it does a certain action -
What is the issue?
I can only detect that arent capitalizated -
What solutions have you tried so far?
I tried putting or “HELP” but that still wouldnt detect strings like “HeLP” etc
here is a video of this issue
(ignore the close, mini/maximise buttons i never fixed them)
here is part of the code that controls this, i have explained some parts just in case
textBox.Changed:Connect(function()
textBox.Text = textBox.Text:sub(1,265)
end)
local function onTextBoxFocusLost(enterPressed, inputObject)
if enterPressed then
local help = "help" -- this is what is used to detect the strings saying help
local _string = "" --detects spaces, removed for post cuz its very long
if _string:match(textBox.Text) then --if the string contains ___ then
local newFrame = script.Parent:Clone()
newFrame.Parent = script.Parent.Parent
newFrame.TextBox.Text = ""
local newText = script.Parent.TextBoxDup
newText.Visible = true
newText.Text = textBox.Text
textBox:CaptureFocus()
textBox:Destroy()
elseif help:match(textBox.Text) then --if the string contains ___ then
local helpoutput = script.Parent.Parent.OutputHelp:Clone()
helpoutput.Parent = script.Parent.Parent
helpoutput.Visible = true
local helplist = script.Parent.Parent.HelpList:Clone()
helplist.Parent = script.Parent.Parent
helplist.Visible = true
local newFrame = script.Parent:Clone()
newFrame.Parent = script.Parent.Parent
newFrame.TextBox.Text = ""
local newText = script.Parent.TextBoxDup
newText.Visible = true
newText.Text = textBox.Text
textBox:CaptureFocus()
textBox:Destroy()