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: table.insert() Help

Previous Thread :: Next Thread 
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
29 Dec 2011 07:21 PM
    plrs = {}
    m = math.random(1,#v)
    m2 = math.random(1,#v)
    table.insert(plrs,m.Name)
    table.insert(plrs,m2.Name)

Output: Workspace.Script:13: attempt to index global 'm' (a number value)

R.I.P Ben Breedlove.
Report Abuse
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
29 Dec 2011 07:22 PM
Full script pl0x?
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
29 Dec 2011 07:23 PM
    plrs = {}
    while wait() do
    for _,v in pairs(game.Players:GetPlayers()) do
    gui = v:FindFirstChild("PlayerGui")
    timer = gui:FindFirstChild("Timer")
    for i = 20,0, -1 do
    wait(0.1)
    timer:FindFirstChild("Frame").Time.Text = i
    end
    v = game.Players:GetChildren()
    m = math.random(1,#v)
    m2 = math.random(1,#v)
    table.insert(plrs,m.Name)
    table.insert(plrs,m2.Name)
    timer:FindFirstChild("Frame").Time.Text = plrs[1].."Is going vs "..plrs[2]
    tool = game.Lighting:FindFirstChild("Break Tool")
    tool:Clone().Parent = p.Backpack
    script.CamScript:Clone().Parent = p.StarterGui
    p.StarterGui.CamScript.Disabled = false
    end end

 

R.I.P Ben Breedlove.
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
29 Dec 2011 07:36 PM
Bump

R.I.P Ben Breedlove.
Report Abuse
cool12309 is not online. cool12309
Joined: 21 Sep 2008
Total Posts: 1442
29 Dec 2011 07:52 PM
m = math.random(1, #v)
m.Name

m is a number, number.Name isn't valid. You have to, for this case, insert the table while in the loop.
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
29 Dec 2011 08:25 PM
?????

R.I.P Ben Breedlove.
Report Abuse
jamesshelf is not online. jamesshelf
Joined: 04 May 2011
Total Posts: 2182
29 Dec 2011 08:29 PM
I have no idea how to script so dont ask me
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
29 Dec 2011 08:29 PM
Then why post?

R.I.P Ben Breedlove.
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
29 Dec 2011 08:39 PM
Bump.

R.I.P Ben Breedlove.
Report Abuse
bikerking200 is not online. bikerking200
Joined: 11 Mar 2010
Total Posts: 5047
29 Dec 2011 09:01 PM
Bump.

R.I.P Ben Breedlove.
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