|
| 13 Aug 2011 12:18 PM |
| What's the function for chat commands? As in, I say something and something happens? Tried the roblox wiki, but seeing as I don't know what it's called, I don't go very far. Does anyone know what it is? |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 13 Aug 2011 12:19 PM |
| Player.Chatted:connect(function(Message) end) |
|
|
| Report Abuse |
|
|
| |
|
Spectrumz
|
  |
| Joined: 22 Mar 2011 |
| Total Posts: 4338 |
|
|
| 13 Aug 2011 12:34 PM |
http://news.roblox.com/index.php/Using_the_Chatted_Event http://news.roblox.com/index.php/Chatted_(Event)
|
|
|
| Report Abuse |
|
|
|
| 13 Aug 2011 12:37 PM |
Thanks. Just to ask, would this work if they mentioned the work anywhere in a sentence/word?
Game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg == "reset" then player.Character:BreakJoints() end end) end) |
|
|
| Report Abuse |
|
|
Spectrumz
|
  |
| Joined: 22 Mar 2011 |
| Total Posts: 4338 |
|
|
| 13 Aug 2011 01:04 PM |
@catlover
No. You'd have to use some kind of string function for that. My guess is string.sub(), although I've never used it. Or maybe string.find().... |
|
|
| Report Abuse |
|
|