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
 

[ Content Deleted ]

Previous Thread :: Next Thread 
Thunderx10 is not online. Thunderx10
Joined: 17 Jun 2009
Total Posts: 2316
06 Nov 2011 12:42 PM
How would I use table.remove to find something in a table and remove it.
I don't know how to find the position of what I want. like say I want to remove "s" but I don't know what position in the table it is.

table = { "s", "a", b"}

table.remove(table, lolwhathere) --How can I find the position

--I know where "s" was, act as if I didn't know, how could I find it?
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
06 Nov 2011 12:44 PM
[ Content Deleted ]
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
06 Nov 2011 12:46 PM
table = { "s", "a", "b"}

function FindFirstTableObj(tableName,object)
    for index,child in ipairs(tableName) do
        if child==object then
            print(index)
            return true
        end
    end
end

FindFirstTableObj(table,"s")

Do something like that
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