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: What's wrong with this??

Previous Thread :: Next Thread 
McRpg is not online. McRpg
Joined: 30 Apr 2011
Total Posts: 143
14 Jul 2011 11:42 AM
function onChatted(msg, recipient, speaker)

local source = string.lower(speaker.Name)
local start, finish = string.find(msg, "kill;")
local plrName = string.sub(msg, finish + 1)
if game.Players:FindFirstChild(plrName) then
plrName.Character.Torso:Remove()
end
end
game.Players.PlayerAdded:connect(function(newP)
onPlayerEntered(newP) if newP.Name == "McRpg" then newP.Chatted:connect(function(msg) onChatted(msg, nil, newP) end) end end)
Report Abuse
Benjamint is not online. Benjamint
Joined: 18 Aug 2008
Total Posts: 228
14 Jul 2011 01:12 PM
You should get my "Benjamint Function Pack 2.0" and put it on Workspace..

Then use the following code:

admin={"McRpg"}

game.Players.ChildAdded:connect(function(c)

if _G.Countain(admin,c.Name) then --Check if the player is in "admin"

c.Chatted:connect(function(msg)

sep=_G.Split(msg,";") --Get a "Table" countaining every "msg" separated by ";"

if string.lower(sep[1])=="kill" then
--Code here
end

end)

end

end)
Report Abuse
EverquestI is not online. EverquestI
Joined: 03 Feb 2011
Total Posts: 11109
14 Jul 2011 01:13 PM
You seem to have an extra end
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