So I am making a word processing software inside roblox. Like I said in my previous post, I am not trying to compete with other softwares like this, just for simulation purposes. Anyway, I was trying to make a ctrl + f function in a textbox. For example, when I put a word in a textbox, the textbox will find the word in a sentence in an another textbox. The problem is, I don’t know how to make it, I haven’t started yet. Any help would be appreciated. Ask questions if you don’t understand mine.
pretty sure its possible to do you could use user input service to check when player clicks ctrl f and then open a textbox the you could write something in the textbox to search a word then you could see if the text contains that word then show it using string.match(yourtext,texttocheck) and then highlight it using rich text this would be a possible solution
So I am done with the key function thingy. However, the function that finds the word and highlight it after it is found is that I can’t seem to work it out. Sorry for the late reply though.
Hi. You make make a function that uses
string.find() to find the mentioned string, and you can set the
.CursorPosition property of the text box when the next button is clicked.
So I made the string.find script. Here it is:
local str = script.Parent.Parent.Parent.Parent.textBoxframe.Box str = str:lower() local word = script.Parent.Text if str:find(word) then --do something end
But how do I specify the word in the textbox I am trying to find? And also I don’t know if this script is right.