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: Commands help?

Previous Thread :: Next Thread 
Saviorofdragons is not online. Saviorofdragons
Joined: 10 Jan 2013
Total Posts: 489
15 Aug 2013 06:06 PM
How would I make a command to where I can say kill/playername and that player will die? I know how to use the .Chatted event and I have made commands with it, I just want to know how to make it with specified arguments if you know what I mean.
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
15 Aug 2013 06:08 PM
[ Content Deleted ]
Report Abuse
Saviorofdragons is not online. Saviorofdragons
Joined: 10 Jan 2013
Total Posts: 489
15 Aug 2013 06:09 PM
Ok, but how would I seperate the kill/ from the playername in the code?
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
15 Aug 2013 06:10 PM
[ Content Deleted ]
Report Abuse
SpleenYanks is not online. SpleenYanks
Joined: 24 Aug 2008
Total Posts: 921
15 Aug 2013 06:13 PM
Player.Chatted:connect(function(Message)
if string.sub(Message:lower(), 1, #"kill/") == "kill/" then
local Rest = string.sub(Message, #"kill/"+1)
print(Rest)
end
end)
---
If the player Chats "kill/123", output would be.
>123
Report Abuse
Saviorofdragons is not online. Saviorofdragons
Joined: 10 Jan 2013
Total Posts: 489
15 Aug 2013 06:14 PM
How would I seperate the kill/ from the player's name, because if I were to have a function that printed what I said it would print kill/Saviorofdragons if I said that, how would I isolate the player's name so that I can find it?
Report Abuse
SpleenYanks is not online. SpleenYanks
Joined: 24 Aug 2008
Total Posts: 921
15 Aug 2013 06:15 PM
Well thanks for ignoring my post...
Report Abuse
Saviorofdragons is not online. Saviorofdragons
Joined: 10 Jan 2013
Total Posts: 489
15 Aug 2013 06:15 PM
lol, sorry I was trying mine when yours came up.
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
15 Aug 2013 06:16 PM
[ Content Deleted ]
Report Abuse
Saviorofdragons is not online. Saviorofdragons
Joined: 10 Jan 2013
Total Posts: 489
15 Aug 2013 06:24 PM
Ok, thanks. But one more question, what does string.sub do? I think it cuts a string at a certain part but I have no idea.
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