|
| 26 Jul 2014 11:31 AM |
I want to make a simple script that changes the text of a GUI whenever I say the word "topic " at the beginning of a message and then anything after the word "topic ". The problem is, I can't figure out how to make an appropriate if statement to do so.
Code: local topic = "Test Test Test" local label = script.Parent
while true do wait() label.Text = topic end
game.Players.PlayerAdded:connect(function(pl) pl.Chatted:connect(function(msg) if (pl.userId == 896716) and (msg == "topic ") then -- help??? topic = msg end end) end ) |
|
|
| Report Abuse |
|
WishNite
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 15828 |
|
|
| 26 Jul 2014 11:33 AM |
msg:lower():sub(1,6) == "topic "
|
|
|
| Report Abuse |
|
| |