|
| 08 Mar 2014 07:15 PM |
well,i checked on wiki,and its hard to understand.. I simply want to check,for example if someone said ex: person says: tgjkfghiPizzajg it finds that the word "Pizza" was in the string,so it prints "he said pizza" or something like that another example: person says hello world,whats new?
it finds that he said the word "world"
how would I go about doing this?? |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2014 07:17 PM |
local message = "wsajdvnbkfdecPizzadfcwa"
local foundItem = string.match(message, "Pizza") if foundItem ~= nil then print "He said pizza!" end |
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Mar 2014 07:19 PM |
lol :P
Just wait till you try to learn patterns. They're insanely easy and insanely difficult at the same time. >_< |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2014 07:19 PM |
so,would this be correct?
game.Players.PlayerAdded:connect(function(p) p.Chatted:connect(function(m) if p.Name == "islandmaker2012" then s = string.match(m,"Show") s2 = string.match(m,"Accs") if s or s2 then Workspace.GetAccs.Value = true end end end) end) |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2014 07:21 PM |
Yup. If you say Show, it will work. If you say Accs, it will work. If you say Showing, it will work. |
|
|
| Report Abuse |
|
|
| |
|