I'm trying to find a word in a string but the string is all 1 word
local Name = 'HelloWelcomeToThisWorld'
print( (Name:match('ToThis') )
does this work?
I'm trying to find a word in a string but the string is all 1 word
local Name = 'HelloWelcomeToThisWorld'
print( (Name:match('ToThis') )
does this work?
This would work, as it is still inside the string, even if it is inside a word. The only thing that is wrong is that you added an extra parentheses, so your fixed code should be
local Name = 'HelloWelcomeToThisWorld'
print((Name:match('ToThis'))
Hope this helps!
That won't work, because with that, you're only setting one word, called 'HelloWelcomeToThisWorld'. There might be any method to bypass that, but with the scripting you have there, that won't work definitely.
If you found this answer helpful, please mark as the solution!
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
What? What do you mean by only setting one string?
i mistaken the word, sorry. You're only setting one word with the thing you pasted there up.