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
 

Table Values

Previous Thread :: Next Thread 
ninja900500 is not online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
19 Jun 2014 10:15 PM
I'm adding a large amount of values to a table inside of a local script through a tool, will this lag my game if there are too many values inside the table?
Report Abuse
DhatBoiiPapi is not online. DhatBoiiPapi
Joined: 27 May 2013
Total Posts: 701
19 Jun 2014 10:24 PM
Say, how much tables?
You can count it using print(#MyTable)
Report Abuse
TheNewScripter is not online. TheNewScripter
Joined: 02 Mar 2010
Total Posts: 2432
19 Jun 2014 10:25 PM
You should try it yourself instead of asking us. Who knows, maybe you'll learn something.
Report Abuse
ninja900500 is not online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
19 Jun 2014 10:32 PM
"Scripting helpers". i guess it really is for people who need help.
Report Abuse
DhatBoiiPapi is not online. DhatBoiiPapi
Joined: 27 May 2013
Total Posts: 701
19 Jun 2014 10:33 PM
..
Report Abuse
TheNewScripter is not online. TheNewScripter
Joined: 02 Mar 2010
Total Posts: 2432
19 Jun 2014 10:34 PM
I'm helping you become more independent so you can learn something on your own and not have to rely on others to confirm it. You're welcome.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
19 Jun 2014 10:35 PM
Depends on what you do with the table, and what a "large number" is.
Report Abuse
ninja900500 is not online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
19 Jun 2014 10:35 PM
scripting wise please, and dhat it's the same number everytime. I guess it's not really adding that many values.
Report Abuse
DhatBoiiPapi is not online. DhatBoiiPapi
Joined: 27 May 2013
Total Posts: 701
19 Jun 2014 10:36 PM
Ninja specify how big the table is using the feature I gave you in output.
Report Abuse
ninja900500 is not online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
19 Jun 2014 10:37 PM
Oh unknown. This is in relation to your raycast scripting thing you sent me that ignores hats and tools. Sadly, it only works for your player not other players. Maybe it's a local problem?

And I kinda rewrote the script.

for i, v in ipairs(game.Players:GetPlayers()) do
if v == Player then
print(v)
for i2, v2 in ipairs(v.Character:GetChildren()) do
if v2:IsA'Tool' or v2:IsA'Hat' then
table.insert(ignore, v2)
print(#ignore)
end
end
end
end

Report Abuse
ninja900500 is not online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
19 Jun 2014 10:37 PM
Dhat, you can use that too. That's the table script.
Report Abuse
DhatBoiiPapi is not online. DhatBoiiPapi
Joined: 27 May 2013
Total Posts: 701
19 Jun 2014 10:38 PM
Nvm.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
19 Jun 2014 10:38 PM
Oh:

if v ~= player then

Right.

Anyway, that's not a very large number. You could increase the efficiency by storing the table permanently, then updating it when something changes, but it probably wont be too bad.
Report Abuse
ninja900500 is not online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
19 Jun 2014 10:41 PM
Oh lol. I changed v == Player on purpose, let's change it back to see if it works.
Report Abuse
DhatBoiiPapi is not online. DhatBoiiPapi
Joined: 27 May 2013
Total Posts: 701
19 Jun 2014 10:42 PM
kk
Report Abuse
ninja900500 is not online. ninja900500
Joined: 27 Sep 2008
Total Posts: 2324
19 Jun 2014 10:50 PM
thanks man, works. i get what you mean by v ~= Player now
Report Abuse
DhatBoiiPapi is not online. DhatBoiiPapi
Joined: 27 May 2013
Total Posts: 701
19 Jun 2014 10:52 PM
mk
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