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: Need help with script please

Previous Thread :: Next Thread 
fizzman is not online. fizzman
Joined: 08 Apr 2008
Total Posts: 141
19 Sep 2011 11:09 AM
Hello. I am making an admin script, one with voice commands. Is there anyone who knows how to insert a script into the workspace when I say a command? Thanks for any help.
Fizzman
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
19 Sep 2011 11:22 AM
Insert>Object>Script xD
Report Abuse
UttermostExedra is not online. UttermostExedra
Joined: 28 Dec 2009
Total Posts: 2483
19 Sep 2011 11:29 AM
@Miro

You ain't really helping. If you're gonna help, then please do it without sarcasm/do it good. By 'good' I mean explaining.

Insert>Object>Script

Open the Script's Source. It should be in workspace. What you now should do is create a .Chatted event. I'll make a little pre-view for you:

commands = {"kill/","kick/"}
admins = {"NAME","NAME"}
for i,v in pairs(commands) do
chatted = function(msg,recipient,speaker)
if string.sub(msg,1,5) == commands[1] then
for i,v in pairs(game.Players:GetChildren()) do
if v.Name == string.find(msg,5) then
v.Character:BreakJoints()
end
end
elseif string.sub(msg,1,5) == commands[2] then
for i,v in pairs(game.Players:GetChildren()) do
if v.Name == string.find(msg,5) then
v:remove()
end
end
end
end
end

game.Players.PlayerAdded:connect(function(plr)
for i,v in pairs(admins) do
if plr.Name == v then
plr.Chatted:connect(function(msg)
chatted(msg,recipient,plr)
end)
end
end
end)
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
19 Sep 2011 11:30 AM
I'm sorry, I didn't really read everthing. Sorry fiz...and utter xD
Report Abuse
fizzman is not online. fizzman
Joined: 08 Apr 2008
Total Posts: 141
19 Sep 2011 11:31 AM
Ty Utter, dont worry Miro.
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