|
| 25 Aug 2013 11:30 AM |
How would I add the person who chatted's name here:
-----------chat saver-------------- game.Players.PlayerAdded:connect(function(chat) chat.Chatted:connect(function(chat) local s = chat local v = Instance.new("StringValue") v.Value = s v.Parent = workspace.Chats end) end) -----------chat saver--------------
|
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Aug 2013 11:40 AM |
game.Players.PlayerAdded:connect(function(player) chat.Chatted:connect(function(chat) local s = player.Name .. " has chatted: " .. chat local v = Instance.new("StringValue") v.Value = s v.Parent = workspace.Chats end) end) |
|
|
| Report Abuse |
|
|
jonman111
|
  |
| Joined: 26 May 2010 |
| Total Posts: 35 |
|
|
| 25 Aug 2013 11:40 AM |
Two anonymous functions inside eachother, both with the same variable "chat" Won't that confuse the script? |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 25 Aug 2013 11:42 AM |
@jon. No, he simply messed it up.
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(chat) local s = player.Name .. " has chatted: " .. chat local v = Instance.new("StringValue") v.Value = s v.Parent = workspace.Chats end) end)
|
|
|
| Report Abuse |
|
|
|
| 25 Aug 2013 11:51 AM |
Thanks, all I really needed was this though: local s = player.Name .. " has chatted: " .. chat |
|
|
| Report Abuse |
|
|