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 » Scripters
Home Search
 

Re: How To Insert Value Into Table?

Previous Thread :: Next Thread 
dudefun1234 is not online. dudefun1234
Joined: 21 Jul 2013
Total Posts: 3038
13 Sep 2017 07:27 PM
I know how to insert a regular value into a table, but what happens when you want to put in something like:


local Paired Input Output = {
[Output] = Input

}


Would it be like? :

table.insert(PairedInputOutput,[Output] = Input)
Report Abuse
Thedagz is not online. Thedagz
Joined: 10 Mar 2012
Total Posts: 798
13 Sep 2017 07:28 PM
local Dictionary = {}

Dictionary["RandomIndex"] = "NewValue"


Basically, you index a nil spot and that automatically gets added in



Need Help With scripting or Hire Scripters? Go here! via Discord : discord.gg/rfnudw6
Report Abuse
dudefun1234 is not online. dudefun1234
Joined: 21 Jul 2013
Total Posts: 3038
13 Sep 2017 07:31 PM
hold up is there a way to reference an actual variable through that method?

What im trying to do is get two values that are connected so that when one changes, the other one can be referenced and changed too. Logic gate input output connections.
Report Abuse
Thedagz is not online. Thedagz
Joined: 10 Mar 2012
Total Posts: 798
13 Sep 2017 07:35 PM
I don't know what that means, reword it
Report Abuse
dudefun1234 is not online. dudefun1234
Joined: 21 Jul 2013
Total Posts: 3038
13 Sep 2017 07:40 PM
1. Switch

2. Gate


Switch turned on, output value = True

Gate references output value from switch, input value of gate = True

Switch turned off, output value = False

Gate references output value from switch, input value of gate = False
Report Abuse
dudefun1234 is not online. dudefun1234
Joined: 21 Jul 2013
Total Posts: 3038
13 Sep 2017 07:45 PM
I mean referencing a variable in a way that I can look at the table. Use for i,v in pairs and take every output, find its input, and make them match values.

I can't use the location or the name of the input output values because there is more than one part with the same name, so im trying to reference the object itself.
Report Abuse
ForceCyber is not online. ForceCyber
Joined: 06 May 2015
Total Posts: 1086
14 Sep 2017 09:38 AM
local Table = {}

table.insert(Table, 2)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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