|
| 13 Dec 2011 07:28 AM |
function onChatted(msg, recipient, speaker)
local source = string.lower(speaker.Name) msg = string.lower(msg)
if (msg == "dizzy") then local user = game.Players:GetPlayerFromCharacter(hit.Parent) local stats = user:findFirstChild("leaderstats") if stats ~= nil then local cash = stats:findFirstChild("Cash") cash.Value = cash.Value +3000 wait() end end end end end end
function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end
game.Players.ChildAdded:connect(onPlayerEntered)
Why dont this work? |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Dec 2011 07:56 AM |
| Re write it correctly then i dont see mistakes |
|
|
| Report Abuse |
|
|
natjdog09
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 1370 |
|
|
| 13 Dec 2011 08:06 AM |
I don't know.. it's bugging me.. :P I can't figure out what's wrong. When you're doing this- did you want to add 3k Cash or change their Cash to 3k? If you're just adding 3k Cash, I have no clue what's wrong, sorry. I can't help on this one. |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 13 Dec 2011 09:55 AM |
You have too many ends, first of all. Second of all, what do you plan on using 'recipient' for? Third.. local user = game.Players:GetPlayerFromCharacter(hit.Parent) What it 'hit'? |
|
|
| Report Abuse |
|
|