transIate
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 2699 |
|
|
| 20 Dec 2013 11:41 PM |
If a Script's name is w.Name = "Name" and if I used an if statement like this
if (msg == "stop") then w:Remove() end
would that work |
|
|
| Report Abuse |
|
|
Madified
|
  |
| Joined: 19 Apr 2011 |
| Total Posts: 5292 |
|
| |
|
transIate
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 2699 |
|
|
| 20 Dec 2013 11:42 PM |
then why won't it work if it was a FloorWire
|
|
|
| Report Abuse |
|
|
Madified
|
  |
| Joined: 19 Apr 2011 |
| Total Posts: 5292 |
|
| |
|
transIate
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 2699 |
|
| |
|
transIate
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 2699 |
|
|
| 20 Dec 2013 11:47 PM |
don't I need a connection line? (game.Players.LocalPlayer.Chatted:connect(function(troll) or something for 'if' statement commands because its like a command |
|
|
| Report Abuse |
|
|
Madified
|
  |
| Joined: 19 Apr 2011 |
| Total Posts: 5292 |
|
| |
|
|
| 21 Dec 2013 12:24 AM |
local Player = game.Players.LocalPlayer local Cmds={stop=function(msg) script:Destroy() end}
Player.Chatted:connect(function(msg) for i,v in pairs(Cmds) do if v.Message:sub(1,#i):lower()==i then v(msg) end end end) |
|
|
| Report Abuse |
|
|