|
| 10 Sep 2017 09:20 PM |
| How could I get a script to separate words in a text box by a space, and turn the ### different words into separate arguments? For example, if the textbox's text is "Hi there" then the script would turn the word "Hi" into one argument and turn the word "there" into another argument forums:FindFirstChild("Let's Make a Deal"):Destroy() |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2017 09:22 PM |
Thanks a lot roblox..
I appreciate it.
forums:FindFirstChild("Let's Make a Deal"):Destroy() |
|
|
| Report Abuse |
|
|
kylerzong
|
  |
| Joined: 06 Aug 2011 |
| Total Posts: 659 |
|
|
| 10 Sep 2017 09:25 PM |
so separating the words?
Like "My Name Is Joe" Would Be Turned Into A Table
print(table[1]) -- Output: "My" print(table[2]) -- Output: "Name" print(table[3]) -- Output: "Is"
???
|
|
|
| Report Abuse |
|
|
|
| 10 Sep 2017 09:26 PM |
| Pretty much. Someone showed me how to separate text by this simbol "|" but I want it to be a space and I searched all over the wiki on how to o it. local command, argument = string.match(testString, ##################### forums:FindFirstChild("Let's Make a Deal"):Destroy() |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2017 09:29 PM |
| ######### /v1qWj61X forums:FindFirstChild("Let's Make a Deal"):Destroy() |
|
|
| Report Abuse |
|
|
kylerzong
|
  |
| Joined: 06 Aug 2011 |
| Total Posts: 659 |
|
|
| 10 Sep 2017 09:30 PM |
| local module = ################### ## I made a module for you -- to use it do: string = "Hey My Name Is Joe" -- the first argument is the character separating the words, the second is the string local words = module:parse(" ",string) for I,v in pairs(words) do print(v) end OUTPUT: My Name Is Joe |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2017 09:30 PM |
Wow, its nice that roblox makes sure I can't get help.
payste been^^
forums:FindFirstChild("Let's Make a Deal"):Destroy() |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2017 09:31 PM |
| Make a ######## thing. Roblox is going to make sure that any way of helping me is blocked forums:FindFirstChild("Let's Make a Deal"):Destroy() |
|
|
| Report Abuse |
|
|
kylerzong
|
  |
| Joined: 06 Aug 2011 |
| Total Posts: 659 |
|
|
| 10 Sep 2017 09:33 PM |
| payhstebeen daught calm /M0zY5h8j |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2017 09:34 PM |
Ty
forums:FindFirstChild("Let's Make a Deal"):Destroy() |
|
|
| Report Abuse |
|
|
kylerzong
|
  |
| Joined: 06 Aug 2011 |
| Total Posts: 659 |
|
| |
|
|
| 10 Sep 2017 09:36 PM |
Testing it rn
forums:FindFirstChild("Let's Make a Deal"):Destroy() |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2017 09:38 PM |
19:37:57.820 - Unable to find module for asset id
forums:FindFirstChild("Let's Make a Deal"):Destroy() |
|
|
| Report Abuse |
|
|
kylerzong
|
  |
| Joined: 06 Aug 2011 |
| Total Posts: 659 |
|
|
| 10 Sep 2017 09:39 PM |
I made it along time ago for strings like "100,500"
|
|
|
| Report Abuse |
|
|
|
| 10 Sep 2017 09:40 PM |
Taken straight from the wiki:
local s = "hello world from Lua" for w in string.gmatch(s, "%a+") do print(w) end
|
|
|
| Report Abuse |
|
|
kylerzong
|
  |
| Joined: 06 Aug 2011 |
| Total Posts: 659 |
|
|
| 10 Sep 2017 09:41 PM |
| It works for me, try changing string to zstring because string already exists |
|
|
| Report Abuse |
|
|
kylerzong
|
  |
| Joined: 06 Aug 2011 |
| Total Posts: 659 |
|
|
| 10 Sep 2017 09:42 PM |
| might just need a while for roblox to catch up with the module since I just uploaded it |
|
|
| Report Abuse |
|
|