Skaipe
|
  |
| Joined: 31 Dec 2011 |
| Total Posts: 6 |
|
|
| 10 Jan 2012 06:33 PM |
function onChatted(msg, speaker)
source = string.lower(speaker.Name) msg = string.lower(msg)
if msg == "blue" then game.Lighting.Ambient = Color3.new(0,0,255) end end
function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg) onChatted(msg, newPlayer) end) end
game.Players.ChildAdded:connect(onPlayerEntered)
--How do I make it where I can only say it? No one else. And I don't want it for when I enter. I'll be in the game already. |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2012 06:37 PM |
Just get rid of the 'onPlayerEntered' function and change the connection line to this:
game.Players.Skaipe.Chatted:connect(function(msg) onChatted(msg, game.Players.Skaipe) end)
"I WILL GIVE YOU BACON." - Deadmau5 ~Scarfacial |
|
|
| Report Abuse |
|
|
Skaipe
|
  |
| Joined: 31 Dec 2011 |
| Total Posts: 6 |
|
|
| 10 Jan 2012 06:38 PM |
--So it'll be this?
game.Players.Skaipe.Chatted:connect(function(msg) onChatted(msg, game.Players.Skaipe) end)
source = string.lower(speaker.Name) msg = string.lower(msg)
if msg == "blue" then game.Lighting.Ambient = Color3.new(0,0,255) end end
function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg) onChatted(msg, newPlayer) end) end
game.Players.ChildAdded:connect()
|
|
|
| Report Abuse |
|
|
|
| 10 Jan 2012 06:38 PM |
@scar
you clearly dont know how to script.
|
|
|
| Report Abuse |
|
|
|
| 10 Jan 2012 06:40 PM |
function onChatted(msg, speaker)
source = string.lower(speaker.Name) msg = string.lower(msg)
if msg == "blue" then game.Lighting.Ambient = Color3.new(0,0,255) end end
function onPlayerEntered(newPlayer) if newPlayer.Name=="YourNameHere" then newPlayer.Chatted:connect(function(msg) onChatted(msg, newPlayer) end) end end
game.Players.ChildAdded:connect(onPlayerEntered)
|
|
|
| Report Abuse |
|
|