generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Somthing wrong whith this script help

Previous Thread :: Next Thread 
dizzybrandon10 is not online. dizzybrandon10
Joined: 29 Mar 2010
Total Posts: 541
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
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
13 Dec 2011 07:53 AM
Too many ends...
Report Abuse
dizzybrandon10 is not online. dizzybrandon10
Joined: 29 Mar 2010
Total Posts: 541
13 Dec 2011 07:56 AM
Re write it correctly then i dont see mistakes
Report Abuse
natjdog09 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image