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: even though im not in table it still runs command

Previous Thread :: Next Thread 
zaniac10 is online. zaniac10
Joined: 18 Aug 2009
Total Posts: 10000
16 Nov 2014 10:52 AM
local admins = {}
local cmds = {
"kill all",
"invincible all",
"kill me",
"invincible me"
}

game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
for i,v in pairs(admins) do
if plr.Name == v then
if msg == cmds[1]:lower() then
for i,v in pairs(game.Players:GetChildren()) do
v.Character.Humanoid.Health = 0
end
end
end
end
end)
end)

it should be making it so only if im in the table it kills everyone, but i was able to run the command even though i wasn't in the table
Report Abuse
zaniac10 is online. zaniac10
Joined: 18 Aug 2009
Total Posts: 10000
16 Nov 2014 11:08 AM
bump
Report Abuse
DevUndead is not online. DevUndead
Joined: 24 Jul 2014
Total Posts: 558
16 Nov 2014 11:15 AM
Turn off the scrub setting in the Config of ur brain ;) try removing the pairs and stick with I, I don't see why you would need and array
Report Abuse
zaniac10 is online. zaniac10
Joined: 18 Aug 2009
Total Posts: 10000
16 Nov 2014 11:18 AM
thanks, this works now:

local admins = {}


game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
for i = 1,#admins do
if plr.Name == i and msg == "kill all" then
for index,players in pairs(game.Players:GetChildren()) do
players.Character:BreakJoints()
end
end
end
end)
end)



Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
16 Nov 2014 11:18 AM
@Dev: What are you talking about?
Report Abuse
DevUndead is not online. DevUndead
Joined: 24 Jul 2014
Total Posts: 558
16 Nov 2014 11:20 AM
Yeah typically arrays are for werid stuff with stuff I don't know or care to learn about but yeah. Stick to on varible unless you have to do something funky leik ur mom
Report Abuse
DevUndead is not online. DevUndead
Joined: 24 Jul 2014
Total Posts: 558
16 Nov 2014 11:20 AM
I have no earthly idea
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
16 Nov 2014 11:22 AM
Lua does not really have an array, unless you count an indexed table.

Tables are really, REALLY useful data structures.
Report Abuse
DevUndead is not online. DevUndead
Joined: 24 Jul 2014
Total Posts: 558
16 Nov 2014 11:24 AM
Shhh Python is cooler than you
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
16 Nov 2014 11:26 AM
I don't really like python, because of the indentation blocks.
Report Abuse
DevUndead is not online. DevUndead
Joined: 24 Jul 2014
Total Posts: 558
16 Nov 2014 11:27 AM
One day you'll get eaten by a snake, I just cursed you homie gg
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
16 Nov 2014 11:28 AM
Do you actually know Lua or Python?
Report Abuse
DevUndead is not online. DevUndead
Joined: 24 Jul 2014
Total Posts: 558
16 Nov 2014 11:32 AM
Python for complex data structures and well as matrix rendering, C++,C# for visuals and for matrix rendering and shading. Lua for roblox and for simple games on the iPad. And HTML ruby cas etc for website design for my online portfolio where I recently published a procedural rock generator that generates normals based on vertex placement.

No I don't know ethier sorry
Report Abuse
WishNite is not online. WishNite
Joined: 11 Feb 2009
Total Posts: 15828
16 Nov 2014 11:35 AM
"Lua for simple games"

>LA Noire
>WoW
>The Guild 2
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
16 Nov 2014 11:36 AM
"Python for complex data structures and well as matrix rendering, C++,C# for visuals and for matrix rendering and shading."

Ok, what are you talking about? "Matrix rendering"? That would be hardware, although the drivers for the hardware are probably written in C.

"Lua for roblox and for simple games on the iPad."

Lua is actually used very commonly (especially in UIs, it would seem. I hear that the XBox UI is written in Lua for example, as well as the obvious WoW UI is in Lua.)

"And HTML ruby cas etc for website design"

HTML is a markup language, Ruby is, like Lua, a scripting language, so I don't know why you group it with HTML.
Report Abuse
DevUndead is not online. DevUndead
Joined: 24 Jul 2014
Total Posts: 558
16 Nov 2014 06:06 PM
Matrix rendering meaning taking a table of vertices and rendition them throught directx or c++ or OpenGL for Python, that's all I use LUA for is roblox and games on the iPad. And hmtl and ruby makes some nice websites and Uis. Chill dawg
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
16 Nov 2014 06:30 PM
You are aware that both DirectX and OpenGL can be used in whatever language they have support for, right?

DirectX is not "for C++" and OpenGL is not "for Python".
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